procmail
[Top] [All Lists]

Re: Whitelist entry for yahoo address letting through yahoo spam..

2004-06-26 23:06:27
Paul Chvostek wrote (a lot of stuff I agree with, but also),

First off, the "H" flag is redundant.  The header is checked by default.

`H' without `B' is redundant (and sometimes destructive because of a bug, but that's another story). The header without the body is what's checked by default. `H' is not redundant when it's part of `HB'.

If $DEFAULT is not a Maildir, you'll need a trailing colon on the second
:0 in order to lock the mailbox.

If $DEFAULT is not a directory, you mean. MH-style directories and classic procmail directories also save each message in a separate file, and they don't need lockfiles either.

Personally, I take a different approach to a whitelist:

  :0 fhw:
  * ? test -s $HOME/.whitelist
  * ? formail -rxTo: | grep -qsiFf $HOME/.whitelist
  $DEFAULT

Huh? What are the `f' and `h' flags doing there? The action is not a filter, and you surely want to save the entire message in $DEFAULT if the conditions pass, not just the head. Probably that should read like this:

  :0: # H without B is the default for conditions except size tests
  * ? test -s $HOME/.whitelist
  * ? formail -rxTo: | grep -qsiFf $HOME/.whitelist
  $DEFAULT

Note that the -q and -s options' behaviour may be different on your
operating system.

Also, some greps don't take -F to turn into fgrep and don't accept -f either, so you'd need fgrep -f instead of grep -Ff there.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail