procmail
[Top] [All Lists]

Re: recipe not working correctly

2001-09-26 12:03:29
Walter Werner wrote:
:0
* ^Subject.*[Ss][Ee][Xx]*
${MAILDIR}/sex

and it appears to be matching things I did not expect, here
is the output from the log, can someone explain what I've
done wrong.
...
procmail: Match on "^Subject.*[Ss][Ee][Xx]*"
...
 Subject: Re: copies of messages sent

A "*" in a regular expression doesn't mean "anything", it means "any
amount (including zero) of the preceding item", therefore you have a
match: "sent" contains an "s", an "e", and zero "x"s. Drop the "*" at
the end of your condition, and it should work.

Two more remarks: You don't need the [Ss] stuff, just "^Subject:.*sex"
is okay; unless you use the "D" flag (":0 D"), procmail ignores
case. And if you're delivering to a mbx file, you should add locking
(":0:" instead of ":0") to be on the safe side if two messages arrive
shortly after each other and two procmail processes try to write to
the same file simultaneously.

/HW
_______________________________________________
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>