procmail
[Top] [All Lists]

Re: Matching a word on Subject or Body

2009-05-11 13:02:30
On 11-May-2009, at 06:49, 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.

Keyword is either, which means you want a conditional check, which means scoring.


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

er.. wow, where to start.

Something more like

:0:
* 9876543210^0 ^Subject:*word*
* 9876543210^0 B ?? ^^word
mbox

:0E:
mail_i_dont_want
#/dev/null

(try that for a bit, when you are sure it's working, then you can route to /dev/null)

If you're delivering to maildir, take off the excess :


--
I hear hurricanes a-blowing, I know the end is coming
        soon. I fear rivers over-flowing. I hear the voice
        of rage and ruin.

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