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
}
Not all versions of test do -e, and -f tells us a little more. -r won't say
much, because at that point procmail likely still has root privileges and
can read anything (or would test go by the ruid? I've never been a sysadmin
and don't know what root access is like).
Be sure you're using a version of procmail recent enough to understand
SWITCHRC. If not, upgrade.
Andrew had answered Peter,
: I thought Procmail automatically looked for the user's .procmailrc before
: using the system's /etc/procmailrc
: I believe it is in the procmail manpage.
No, it's just the opposite: procmail will go to /etc/procmailrc first unless
there is an rcfile named on procmail's command line at invocation, in which
case procmail will skip /etc/procmailrc and go straight to ~/.procmailrc
without going back to /etc/procmailrc later; that's* what's in the man page.
On most systems, I should imagine, a user could bypass /etc/procmailrc by
calling procmail with a .forward file (so that procmail is not invoked as
the integrated LDA) that names .procmailrc on the command line. But that
would be selected at the user level, not laid down by the sysadmin as Peter
wants to do.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail