procmail
[Top] [All Lists]

Re: Grouping filter conditions

1996-10-25 22:35:05
On Fri, 25 Oct 1996, Catherine Hampton wrote:

Is it possible to group conditions, so that in one search
command you can search From:, Reply-To:, Message-ID:, and
Path: headers for a particular domain name/IP address, and
then perform the same response to all of them?  Something
like this...

:0
* (From:|Reply-To:|Message-ID:|Path:)|\
      (.*moneyworld\.com|\
       .*cyberpromo\.com)

I tried this and it didn't work, and I can't figure out why.

You're missing an important part of that recipe - the ^ before the first 
(.  The ^ tells Procmail that it should check at the beginning of the 
line for From, Reply-To, etc.  Here's what I think would do the job.

:0
* ^(From|Reply-To|Message-ID|Path).*(moneyworld|cyberpromo)\.com
/dev/null

From what I know about Procmail, I think this will do the job.


Zach Babayco 

zachb(_at_)netcom(_dot_)com <-------finger for PGP public key
http://www.geocities.com/SiliconValley/Park/4127
-----
If you need to know how to set up a mail filter or defend against 
emailbombs, send me a message with the words "get helpfile" (without the 
" marks) in the SUBJECT: header.  I have several useful FAQ's and documents 
available.

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