procmail
[Top] [All Lists]

Re: does procmail always use ~/.procmail

2008-12-06 08:49:41
On Sat, 6 Dec 2008, csirt wrote:
i want to use a "fallback" filter ruleset in /etc/procmailrc, but if a
user decides to use his own filterset,
he should be able to do it in his homedir with .procmail.
My question is, does procmail always use the .procmail in user homes in
precedence if one is present, and if not falls back to /etc/procmail?

Firstly, double check on your system that it's not the standard 
'.procmailrc', instead of '.procmail'....

man procmail says this to answer your question:

If no rcfiles and no -p have been specified on the command line, procmail
will, prior to reading $HOME/.procmailrc, interpret commands from
/etc/procmailrc (if present).  Care must be taken when creating
/etc/procmailrc, because, if circumstances permit, it will be executed
with root privileges (contrary to the $HOME/.procmailrc file of course).

So to get a "fallback" effect use a condition at the start of
/etc/procmailrc that tests for the existence of users rc file and
either 'includes' it.... or bypasses all /etc/procmailrc code....

-C

____________________________________________________________
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