procmail
[Top] [All Lists]

Changing user home directories?

1998-02-03 10:13:53
First, some background...

   I'm installing procmail on our mail servers as the local delivery
   agent, but I don't want procmail to use the directory specified
   in /etc/passwd as the user's home directory.

   Because we use AFS, checking for ~/.procmailrc and splitting
   messages into separate mailboxes would fail (unless we use an
   IP ACL, which then adds security complications).

   In the past mail that had to be redirected was done by way of
   a .forward file found in a common directory shared off of an
   NFS RAID (/var/forward/username).  I would like to do something
   similar for procmail.

   Because some other applications actually need to get the user's
   true home directory out of /etc/passwd, I don't want to change the
   password file to contain /var/forward/username either -- it has to
   be configured through procmail.

Now some questions...

   I've taken a look at the source, and it seems to me that procmail
   uses the entry derived from /etc/passwd for all $HOME expansions.
   Accordingly, I wrote a wrapper around the cgetpwnam and cgetpwuid
   functions to change pass->pw_name to /var/forward/username.

   In testing, it seems to work just fine.

   Has anyone else done something similar?  Are there additional
   functions that I need to wrap that I've missed?  Any ramications
   that I haven't thought of, or situtations that I'm not accounting
   for?

Any input that anyone can offer would be appreciated.

Thanks,

Chris

<Prev in Thread] Current Thread [Next in Thread>
  • Changing user home directories?, Christopher Lindsey <=