procmail
[Top] [All Lists]

Re: Multiple sort lines problem

2009-05-28 13:45:10
On Thu, May 28, 2009 at 07:05:24PM +0200, Holger Wahlen wrote:
* Arthur Dent wrote:
Using scoring, you can specify something like:

:0:
* 9876543210^0 ^TO_kiddie2\@(mymail|mydomain)
* 9876543210^0 ^Received.*for..kiddie2\@(mymail|mydomain)
INBOX/Kiddie2

Which will stop evaluating conditions as soon as one evaluates true (the  
number exceeds the "maximal" scoring value - otherwise, all the 
conditions would be evaluated, and as long as the score result was >0 
when done, it'd take action).

Thanks for that. If you see my post, which must have crossed with yours,
you'll see that I stumbled across this myself. This is what I came up
with:

:0:
* 1^0 ^TO_(me|myothername)\@(mymail|mydomain)
* 1^0 ^Received.*for..(me|myothername)\@(mymail|mydomain)
INBOX/Me

I had never come across scoring before today.
Can you explain the significance of 9876543210 in your recipe vs the 1
in mine?

He did, see the quoted passage. Normally procmail goes through all the
scoring lines in a recipe, adds up the scores and only takes the
specified action as soon as the result is positive - keep in mind that
you could have negative scores for certain conditions too. But if the
value reaches procmail's idea of "plus infinity" in between already, the
result is considered positive regardless of any remaining conditions,
and the action is performed: in your case, this means that the second
condition can be neglected as soon as the first one has matched already.
Actually a value of 2147483647 is sufficient as "plus infinity" already
for procmail (see man procmailsc), but 9876543210 is often used because
it's easier to remember and to recognize.

Ahhhh! Got it!

Thank you - a very clear explanation. I am all set now. Your help
(everyone) is much appreciated.

Mark

Attachment: pgpXWtpFDiI4s.pgp
Description: PGP signature

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