procmail
[Top] [All Lists]

supremum and infemum scores

2001-01-06 16:45:20
Dallman wrote, addressing Philip,

| I keep in my .procmailrc:
| 
|   INFINITY = 2147483647.0       # "magic" number limit for procmail scoring
| 
| Actually, I just added the ".0" at the end after your mail.  Not sure
| if it's necessary.

No, the decimal doesn't change anything.

I make procmail do more work, I'll admit.  Mine is

 :0
 * 9^9
 { max = $= }

left over from days when I was allowing for potential changes in the maximum
score.

| But anyway, I did see some logs that implied that conditions kept
| going, kept being checked, even after an "$INFINITY" one had
| been triggered in a scored recipe.  Weird.

There's a difference between reaching infemum (-2147483647) and reaching
supremum (+2147483647).  If the score hits infemum, the recipe is a
mismatch and procmail aborts it without testing remaining conditions nor
running the action.  But if the score hits supremum, procmail skips remaining
*weighted* conditions but still tests any remaining *unweighted* conditions;
all unweighted conditions, even those found after the score has reached
supremum, have to pass for the recipe to be a match; any failure among them
makes the recipe mismatch despite the supremum score.

(If there ever will be an ORing flag, the behavior would have to be different
when it is in use: reaching supremum would make the recipe a match regardless
of unweighted conditions, while hitting infemum would mean continuing to test
any remaining unweighted conditions, because they'd all have to fail for the
recipe to mismatch, and any passing condition among them would make the
recipe match despite the infemum score.)

| And why do some people use 987654321?

Because they're lousy typists.  It should be 9876543210, which is just an
easy-to-remember number that exceeds procmail's maximum and will register
as maximum.  987654321 won't do the trick.

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