procmail
[Top] [All Lists]

Recipe help! Search list, -if not- found then deliver *here*.

2001-05-09 12:42:06
How would one do the following?

Message is processed,
search *entire headers* for an address from a list of 40 addresses. (could
be text file)
If match, then deliver to /var/mail/"USERNAME"
If no match, then deliver to /var/mail/"ISPSPAM"

This is what I came up with and it does not work...

:0:
*!
dustin(_at_)mydomain(_dot_)com|andy(_at_)mydomain(_dot_)com|bob(_at_)mydomain(_dot_)com|joebob(_at_)mydomain(_dot_)com|b
objoe(_at_)myname(_dot_)com
/var/mail/ISPSPAM


Our ISP delivers mail that is not to me. (dustin(_at_)mydomain(_dot_)com)  I 
also get
(dustin(_at_)notmydomain(_dot_)com and dustin(_at_)notmydomain2(_dot_)com) 
Which are the names of
the ISP servers.  So I get LOTS of spam that is not even "to" our users.

The search would check for any of the 40 addresses, and if it finds one then
it delivers normally.
but if it does not find any of the 40 addresses in the headers (anywhere in
the headers) then it goes to the bit bucket.

And the reason I want to search the entire header and not just the ^To: this
should get the BBC: and other lists all in one shot.

TIA!
Dustin

_______________________________________________
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>