procmail
[Top] [All Lists]

Re: How to subvert global procmailrc

2004-11-15 15:32:30
On Mon, 15 Nov 2004 11:25:40 -0500 (EST), Tuc <tuc(_at_)ttsg(_dot_)com> wrote:

        What I'd like to be able to have is something like (pseudocode) :

if exists (/home/$LOGNAME/.procmailrc)
then
    INCLUDERC=/home/$LOGNAME/.procmailrc
    exit
else
    | /usr/local/cyrus/bin/procmail-cyrus-delivery.sh $LOGNAME
fi

The above is just

DROPPRIVS=yes
SWITCHRC=/home/$LOGNAME/.procmailrc
:0
| /usr/local/cyrus/bin/procmail-cyrus-delivery.sh $LOGNAME

However, if /home/$LOGNAME really is the home directory of the user,
then you may find that the .procmailrc is executed twice (in the event
that it doesn't perform a delivery during the first execution),
because after the SWITCHRC is done, procmail will continue reading its
normal sequence of files.  So Jake Di Toro's answer may be a better
fit to your problem.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail