procmail
[Top] [All Lists]

Re: Request for syntax assistance

2003-12-14 09:54:38
On Sat, 13 Dec 2003, Nick wrote:
I am having a little syntax trouble that I was hoping someone could help
me with.

Not a prob. The secret here is that procmail uses a 'drop through' kind of
logic. To get to the users .procmailrc, you need to 'drop past' all
the recipes you don't want to execute. So reverse the conditions and
place the 'bypassed' recipes in nesting blocks

Here is the revised pseudo-code, with indentation adjusted to reflect
nesting blocks:

Check all mail with Anomy. 
Check against my subscribed-mail list file
if NOT from a list
   { # ENTER NESTING BLOCK, OTHERWISE FALL TO BOTTOM
   Check against the .whitelist
   if NOT on whitelist
      { # ENTER NESTING BLOCK, OTHERWISE FALL TO BOTTOM
      Filter with Spamassassin
      } # DROPS TO HERE IF ON WHITELIST
   } # DROPS TO HERE IF ON MAILING LIST
# END OF PROCMAILRC GO TO $HOME/.procmailrc

The last line of your original pseudo-code is a bit unclear:
All remaining mail should go to $HOME/Mail/unknown

What mail do you consider "remaining"? If mailing list mail and whitelist
mail go straight through, then what 'remains' is mail that has been
filtered by spamassassin. At this point, you could test for the 'spam'
result from spamassassin and deliver based on that, or let it drop through
to the user's rc, which is probably better for them. Let *them* decide
what happens to their mail. 

- Charles


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

<Prev in Thread] Current Thread [Next in Thread>