procmail
[Top] [All Lists]

Re: Counting hits

2004-06-03 09:40:02
Cyrille wrote,

:0
* 1^1 a
* 1^1 b
* 1^1 c
{ SCORE=$= }

# SCORE will be 0 if a, b or c aren't matched

No, SCORE will be undefined if neither a nor b or nor c is matched, because procmail will not enter the braces. If you want it to be zero, you have to set it outside the braces:

 SCORE=0
 :0
 * 1^1 a
 * 1^1 b
 * 1^1 c
 { SCORE=$= }

or

 :0
 * 1^1 a
 * 1^1 b
 * 1^1 c
 { }
 SCORE=$=



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