procmail
[Top] [All Lists]

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

1996-08-01 13:32:13
On Thu, 1 Aug 1996, Catherine Hampton wrote:

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

Use something of the form:
* ^TO(address1|address2|address3|...|addressn)

The only problem with that is that it can get messy with many addresses,
and the line buffer is only so long, so you can use \'s as continuation
characters at the end of lines, so, the following SHOULD work [also note
that I have escaped the ()'s in the second address.  I think this is what
you actually intended.  If not, just remove the \( and \)]

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

   +------------------------------------+-------------------------------+
   | Hiram W. Lester, Jr.               | E-Mail: hwlester(_at_)pobox(_dot_)com 
   |
   | Computer Science                   | Homepage:                     |
   | Middle Tennessee State University  |   http://pobox.com/~hwlester/ |
   +------------------------------------+-------------------------------+

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