Scott Palmer <scottp(_at_)pcisys(_dot_)net> writes:
I seem to be having an issue getting something to work. What I want is for
my ruleset to check one list to see if it is from anyone, if no match then
check another list to see if it is to someone, and then if no match there
run my spamfilters.
This is basically so I can have a list of good senders and a list of
people who do not want filtering.
...and the question is?
(Even if it seems obvious, please state your exact question. I'm
_guessing_ your question is "why doesn't the third recipe ever get
invoked?" but I could be wrong, because you didn't actually say so.)
:0
* ^From.*
{
:0 f
* ? formail -x"From" -x"From:" -x"Sender:" \
| egrep -is -f /etc/procrcs/wanted.lst
| formail -A "X-NoBounce: On Wanted List"
:0 E
{
:0
* ? formail -x"To" -x"To:" \
| egrep -is -f /etc/procrcs/receive.lst
| formail -A "X-NoFilter: Does not want filtering"
}
:0 E
{
INCLUDERC=/etc/procrcs/ruleset.rc
}
}
The last recipe, the second with an 'E', will never be invoked because
the previous recipe ON THE SAME NESTING LEVEL will never fail to match
because it has no conditions. Solution, remove the extra nesting level
in the middle recipe.
Also, you left off the 'f' flag on the second filter, you should probably
give the 'w' flag on both the filters in case formail can't be found
or fails. I'm not sure what the outer condition ("^From") was for,
as it'll always match (every message has a "From " line), and I doubt
you want to pass formail -x"From" or -x"To". So:
:0 fw
* ? formail -x"From:" -x"Sender:" | \
egrep -is -f /etc/procrcs/wanted.lst
| formail -A "X-NoBounce: On Wanted List"
:0 Efw
* ? formail -x"To:" | \
egrep -is -f /etc/procrcs/receive.lst
| formail -A "X-NoFilter: Does not want filtering"
:0 E
{ INCLUDERC=/etc/procrcs/ruleset.rc }
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail