procmail
[Top] [All Lists]

Re: recipe not working correctly

2001-09-26 13:10:54
On Wed, Sep 26, 2001 at 10:11:57AM -0700, Walter Werner wrote:
Hello,

I have defined a recipe

# put sex mail into sex folder
:0
* ^Subject.*[Vv][Ia][Aa][Gg][Rr][Aa]*
${MAILDIR}/sex

:0
* ^Subject.*[Ss][Ee][Xx]*
${MAILDIR}/sex

Using character classes is unnecessary. By defualt procmail is case
in-sensitive when reading headers, so all you need is "* ^Subject.*viagra" and
"* ^Subject.*sex" Note that you also don't need the * at the end. However,
these recipes will match anything containing the words "viagra" or "sex".
These can be simplified:

:0:
* ^Subject:[    ]*(viagra|sex)
sex


If $MAILDIR/sex is an mbox, you need locking. If it's a maildir you don't. The
brackets contain a literal tab and space. You don't need to specify
"${MAILDIR}/" in the action line. That is assumed.


 Subject: Re: copies of messages sent

I can't explain why this matched "^Subject.*[Ss][Ee][Xx]*" though.



-- 
Andrew Edelstein        -       andrew(_at_)pure-chaos(_dot_)com
http://andrew.pure-chaos.com

Of course, I managed to hurt my hand in the process. Well, hey, it was worth
it. :)
                                Donna M. Jaggard 
<d(_dot_)m(_dot_)j(_at_)mybc(_dot_)com>
                                Thu, 17 May 2001 14:08:47 -0700
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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