Julian Cowley wrote:
Hi Stephan,
I noticed that you changed i;ascii-numeric comparator recently
(<http://hg.rename-it.nl/dovecot-1.2-sieve/rev/17fb38aee85f>) to correct
a small bug. I have an interest in this because I use the comparator to
check for SpamAssassin scores. Before the fix, this was all that was
necessary to check for scores above a certain value:
header :value "ge" :comparator "i;ascii-numeric" "X-Spam-Score" "5"
Since SpamAssassin includes negative scores and the i;ascii-numeric
comparator doesn't recognize negative numbers, all negative scores are
actually treated as positive infinity after the fix. Of course, this
means mail which has a negative score then gets counted as spam.
Autsj!
Now an additional test is necessary, something like this:
allof(not header :matches "X-Spam-Score" "-*",
header :value "ge" :comparator "i;ascii-numeric" "X-Spam-Score" "5")
I thought I'd mention this because other people may get affected by this
once 0.1.15 comes out.
I'll mention it in the release mail.
Here is a patch that makes further tests for the comparator between
numeric and non-numeric values. Hope you can use it.
I a added it just now. If only more people would file their bugs and
comments as ready-made test suite scripts :)
Regards,
Stephan.