procmail
[Top] [All Lists]

Re: Multiple "^TO" tokens in one recipe?

1996-08-01 15:18:21
ariel(_at_)best(_dot_)com (Catherine Hampton) writes:
I'd like to be able to scan for multiple conditions and then run the same 
recipe on everything that meets any one of the conditions.  Unfortunately 
the following syntax looks for incoming mail that meets all conditions, 
rather than any one of them:

:0
* ^TOnospam(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com
* ^TO(recipient list suppressed)
* ^TOariel(_at_)netcom(_dot_)com
* ^TO*(_at_)*seer*
* ^TO*(_at_)*gentoo*
* ^TOariel(_at_)shellx*
* ^TOariel(_at_)shell1*
* ^TOariel(_at_)nntp*
bulk.incoming

Right now I repeat the recipe for each condition, which is a nuisance
to maintain and not terribly efficient.


:0
* ^TO(nospam(_at_)ariel\(_dot_)vip\(_dot_)best\(_dot_)com|\(recipient list 
suppressed\)\
        |seer|gentoo|ariel@(netcom\.com|shellx|shell1|nntp))
bulk.incoming


Note that the literal periods and parens must be escaped.


I'd also like to scan for and filter out mail which entirely lacks a
To: header, and am not sure how to do this.

:0
* ! ^(Resent-)?To:
wherever

Beware, some Bcc's may be missing To: headers, so I wouldn't recommend
tossing these in /dev/null


Philip Guenther

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