procmail
[Top] [All Lists]

Re: Using personal .procmailrc over global .procmailrc

2002-02-13 21:57:06
"David W. Tamkin" <dattier(_at_)ripco(_dot_)com> writes:
Peter White asked,

| I am relatively new to Procmail, so excuse me if this question has been
| asked a million times before. Anyway, if a user has a .procmailrc file in
| their home directory I want Procmail to use that instead of the global
| .procmailrc. I have read discussions where people say it is possible, but
I
| have been unable to find instructions on how to implement it.

In /etc/procmailrc,

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

If this is used in the /etc/procmailrc file itself and not from an
INCLUDERC, then the better choice would be to make procmail think it
hit the end of the rcfile by setting SWITCHRC to /dev/null:
        :0
        * ? test -f $HOME/.procmailrc
        {
                SWITCHRC = /dev/null
        }

That also lets procmail perform security checks on the user's .procmailrc
to make sure it's owned by the correct user and has 'safe' permissions.


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