[Tickets #7308] Sieve: numeric comparison with negative numbers fails
bugs at horde.org
bugs at horde.org
Tue Sep 9 09:11:59 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/7308
------------------------------------------------------------------------------
Ticket | 7308
Created By | bb at apc.ag
Summary | Sieve: numeric comparison with negative numbers fails
Queue | Ingo
Version | 1.2
Type | Enhancement
State | New
Priority | 2. Medium
Milestone |
Patch | 1
Owners |
+New Attachment | sieve-nonegative.patch
------------------------------------------------------------------------------
bb at apc.ag (2008-09-09 05:11) wrote:
When using the Sieve backend in Ingo and setting numeric comparison of
X-Spam-Score, Ingo generates a rule that compares the X-Spam-Score
numerically with the entered value (e.g. 5). The problem is that this
comparison fails with negative spam scores (which can be quite common)
and the e-mail is moved into the spam folder. See, e.g.:
http://tomster.org/blog/archive/2004/12/15/spamfiltering-using-spamassassin-and-sieve
The rule will be correct if it checks for the minus sign.
Wrong:
if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-Score" ["6"] {
Correct:
if allof ( not header :comparator "i;ascii-casemap" :contains
"X-Spam-Score" "-", header :value "ge" :comparator "i;ascii-numeric"
"X-Spam-Score" ["6"] ) {
Working patch attached.
More information about the bugs
mailing list