procmail
[Top] [All Lists]

Re: regarding OR's on multiple lines

2008-06-18 12:00:25
At 04:46 2008-06-18 +0200, Michelle Konzack wrote:
Scoring?

:0:
*       H ?? ! ^TO_tld\(_dot_)procmail(_at_)stimulacra\(_dot_)com
*       H ?? ! ^From:.*stimulacra\.com
*  10^0
* -10^0 H ?? ^Subject:.*(phrase1|phrase2|phrase3)
* -10^0 H ?? ^Subject:.*(phrase4|phrase5|phrase6)
* -10^0 H ?? ^Subject:.*(phrase7|phrase8|phrase9)
/mail/has_catch_phrase

You've got it backwards. As written, the To and From would need to match (which is correct), and then you have an arbitrary 10 point assignment, and if ANY of the catch phrases were found, it'd NOT match, as each catch phrase would SUBTRACT 10 from your initial no-condition score of 10. If none of the catch phrases are there, your recipe would trigger as TRUE.

Remove non-condition scoring line, as well as the sign from the condition lines, and you'd be on track.

FTR, I already recommended scoring. Maximal if any match is sufficient (why waste the cycles looking for further matches?), and non-maximal if you want to be able to log each individual match, though any one would still trigger the recipe as true (so long as the To and From conditions were matched).

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

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