procmail
[Top] [All Lists]

Re: Question on procmail

1999-08-23 15:33:07
Andre Feld <feld(_at_)adsl-feld(_dot_)rz(_dot_)rwth-aachen(_dot_)de> writes:
I'm using procmail als local mail delivery agent. 
I have 2 PC's.
PC A is always online, PC B is often down.
PC A is the mail server but the homes are on PC B.

My question is:

How can i tell procmail to search for the users procmailrc not in his
home but in a local directory on PC A. 

I have done similar things for the .forward. (O
ForwardPath=/etc/mail/forward/$u).

Otherwise the email which arrives while PC B is down will not be
delivered, because procmail will not find the procmailrc. Is it possible
to reconfigure this in the /etc/procmailrc? If yes, how?

The best way to change this is at compile time.  Look in config.h for
the lines:

#define PROCMAILRC      "$HOME/.procmailrc"     /* default rcfile for every
                                                   recipient;  if this file
        is not found, maildelivery will proceed as normal to the default
        system mailbox.  This must be an absolute path or bad things will
        happen. */


Change that to something like:


#define PROCMAILRC      "/var/procmailrcs/$LOGNAME" /* default rcfile
                                                       for every recipient;
        if this file is not found, maildelivery will proceed as normal
        to the default system mailbox.  This must be an absolute path
        or bad things will happen. */


(Don't use /etc/procmailrcs/$LOGNAME, as that already has a special
meaning.  /etc/mail/procmailrcs/$LOGNAME should work.)

Now for the fun bit: when it goes to process the rcfile, procmail will
chdir to the directory containing all the procmailrcs instead of $HOME.
Given why you are doing this, this is a feature.  However, users should
be made aware that procmail won't be running in $HOME, and indeed,
$HOME might not be availible at all.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>