procmail
[Top] [All Lists]

Re: Matching a word on Subject or Body

2009-05-11 09:28:07
On Mon, May 11, 2009 at 09:49:04AM -0300, Diego Alencar Alves de Lima wrote:

I've been trying to accept only messages that have a certain word
either on the subject line or on the first line of the body. I could
not figure out the right filters to do that. I currently have the
header filter set up:

:0
* ! ^Subject:.*word1*
 ! ^Subject:.*word2*
/dev/null
}

However I still wanted to check the first line of the body for either
word 1 or 2.

The above is not correct syntax, Diego.  There are about six
things wrong with it.  Let's just start over.

   :0
   * 9876543210 ^0 ^Subject:(.*\<)?(word1|word2)(\>|$)
   * 9876543210 ^0 B ?? ^^(.*\<)?(word1|word2)(\>|$)
   accept_action

Dallman
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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