procmail
[Top] [All Lists]

Re: Matching a word on Subject or Body

2009-05-11 10:50:12
I needed a policy that first switched on a subject, and if that was
found then check for a string in the body:

:0:
* ^To:(_dot_)root(_at_)dmznb-b(_dot_)dmzbbus(_dot_)rpslmc(_dot_)edu
* ^Subject:.Backup
{
    :0B:
    * succeeded
    /dev/null
}

It was pointed out to me by members of this list that checking the body
of a messages is *VERY* expensive.  Only do it when you absolutely have
to.
So I would check the subject line and then only check the body if you
have to.


Christopher Barnard
--------------------------------------------------------------------------
comment your code as if the maintainer will be a homicidal maniac who
knows where you live.

On Mon, 2009-05-11 at 09:49 -0300, Diego Alencar Alves de Lima wrote:
Hello all,

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.
Does anyone have any idea about how to do that?

Regards,
Diego Lima

____________________________________________________________
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


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