Dan Liston (from sonny.org? what a punch in the face) asked,
Well, first there's the question in the subject line, which didn't
reappear in the text.
The basic difference between ^TO and ^TO_ is that ^TO_ will not match a
string that ends in a hyphen, while ^TO will. Stephen was going to
change ^TO so as not to match a string ending in a hyphen, but (perhaps
other people as well and) I pointed out that the use of ^TOname to catch
such things as "To: owner-name" or "To: real-name," and he didn't want
to break that, plus he regretted not having named it ^TO_ in the first
place, so he left ^TO as it was and added ^TO_, which was the token he
had wanted to use originally anyway, to have the expansion he had really
wanted originally.
1. Is the global /etc/procmailrc *always* used since it exists?
It is used when procmail is invoked with no rcfiles named on its command
line. Note that the -m option requires naming exactly one rcfile, so
procmail -m never reads /etc/procmailrc unless that's the named rcfile
or the named rcfile calls /etc/procmailrc with INCLUDERC or SWITCHRC.
2. Are the recipes in the global file given a precedence over a
personal rc file? Or should I "INCLUDERC" the /etc/procmailrc
from my personal ~/.procmailrc file?
If procmail reaches the end of /etc/procmailrc without completing
delivery, it drops privileges and moves to ~/.procmailrc. Do *not* call
~/.procmailrc as an INCLUDERC within /etc/procmailrc, or it may be run
twice, and especially don't do that if you haven't dropped privileges
yet, because then ~/.procmailrc will be processed as root.
3. When is the right time in the /etc/procmailrc to DROPPRIVS?
I assume this means procmail is running as root or mail until
a DROPPRIVS=yes is encountered, at which time, procmail will
run as the user a message is to be delivered to.
That depends on the code in /etc/procmailrc. If none of it requires
root rights, drop at the beginning. In any case, procmail will drop
them automatically if it gets to the end of /etc/procmailrc without
completing delivery and moves to ~/.procmailrc.
4. When it is better to use the /etc/procmailrcs/some-recipe.rc
file location?
There I can't help you, so let's wait for someone else to step forward.
DWT
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail