T. Horsnell (tsh) wrote:
> We have a periodic clearout of users who have left.
> Part way through this procedure I disable the home
> directories of such users, in order to flag up anyone
> else who may be inadvertently using their files.
> This caused exim to complain that it couldnt check
> for the presence of a .forward file in that user's
> home directory, and so I added a
>
> require_files = $home/.forward
>
> condition to the userforward router so that it would be
> skipped if the home directory was unreadable.
>
> This seems to work OK, but when the localdelivery transport
> runs, it seems to want to access the user's home directory
> even though delivery is directed to /usr/spool/mail/$local_part
> This generates a 'permission-denied' error.
>
> Any suggestions? (Apologies for the length of the attached bumpf)
>
> Terry.
>
Yep, I've noticed that, and it's quite annoying. What I wanted to do was to
be able to create new users simply by adding them to the LDAP database as
Exim will create directories it needs to for delivery if they don't exist.
However, it fails to do so because the appendfile transport wants to do
something with the users home directory which for a new user doesn't exist.
What I've done is to put this in the local_delivery transport (for maildir
format delivery):
home_directory = HOME
directory = $home/$local_part/Maildir
HOME is a macro set to one level up from the users "home" directory. The
appendfile transport now thinks the home directory is the directory one up
from the uses non-existent "home" directory and happily creates the users
"home" directory structure for delivery if it doesn't exist.
In your case you could try this:
home_directory = /usr/spool/mail
file = $home/$local_part
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@???
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555