procmail
[Top] [All Lists]

Re: Format Clarification

2001-03-08 12:12:50
Eric Hilding <rick(_at_)hilding(_dot_)com> writes:
I need a clarification of the format to thrash some mail that is NOT
addressed to one or more designated addresses at three domain names
(okname1 is legit at all domain names, etc.)

Before I throw the switch on the (modified) recipe, I'd rather be safe
than sorry.
Did I get it right?

Thank you.

:0 B
* H ?? !^TO(okname1|okname2|okname3)@(domain1|domain2|domain3)\.com
* ()\<(free|http://|guaranteed|no cost|apply now|remove from mailing|\)
      amazing|send no money)\>
/dev/null

Looks good to me, though if your version of procmail is at least as
new as version 3.11pre4 then it would be slightly more precise to use
"^TO_" instead of "^TO".

The difference is that ^TObob will match if a recipient header (To:,
Cc:, etc) contains an occurence of "bob" that is preceeded by something
besides a letter, while ^TO_bob looks for an occurence of "bob" that is
preceeded by something that is not a letter, number, period, hyphen,
or underbar.  The result is approcimately that ^TO looks for "words"
while ^TO_ looks for "addresses".


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