At 21:54 2003-12-13 -0600, Nick wrote:
Thanks for the answer. I think I asked the question incorrectly. Here is
what I want to do in a sort of pseudocode.
I have most of it, but I am unsure about the parts labeled "continue to
the $HOME/.procmailrc" that is what I meant about terminating the rest
of the /etc/procmailrc file. If I match a condition, I want to skip the
rest of the file.
So, cease processing the current rcfile.
note what SWITCHRC does, especially "If the named rcfile doesn't exist or
is not a normal file or /dev/null then an error will be logged and
processing will continue in the current rcfile."
At 22:53 2003-12-13 -0600, Nick wrote:
# Check against personal whitelists
FROM=`formail -XFrom: | formail -r -xTo: | tr -d ' '`
* ? grep -F -i -x -q "$FROM" $HOME/.whitelist
I'd advise if you're going to do this, do:
I can't say for certain, but I'd expect that /etc/procmailrc would retain
it's privledges when switching to a user rcfile in this fashion (which
differs from terminating proccessing of the current rcfile). Even if it
doesn't, it can't hurt to do it like above just to enforce the fact that
privledges are being dropped.
BTW, have you considered what happens if there is no $HOME/.procmailrc (see
the procmailrc manpage)?
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
procmail mailing list