procmail
[Top] [All Lists]

RE: tips on writing /etc/procmailrc so that it can be run as 'root' or as a user?

2004-02-24 10:43:48
more coffee. Quick corrections below. Need to prefix 'test' with a ?
to tell procmail to execute the program and test the exit code:


or perhaps maintain the semantics of virus and spam trapping by doing the
following:

:0
* ! ? test -w /var/mail_log
{
# Can't write to /var/mail_log, therefore resort to using the user's
# home directory.
USER_LOGFILE=$HOME/procmail.log
SPAM_TRAP=$HOME/spam_trap.mbox
VIRUS_TRAP=$HOME/virus_trap.mbox
}

And then there's an idea that has been mentioned before:

:0
* $ ? test -e $HOME/.procmailrc
{
DROPPRIVS=yes
SWITCHRC
}



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail