[Dovecot] Possible pigeonhole dealing with negative numerical values
Stephan Bosch
stephan at rename-it.nl
Sat Dec 14 23:37:12 EET 2013
On 12/14/2013 7:05 PM, Sam Mulvey wrote:
> Using dovecot 2.2.9 and pigeonhole 0.4.2
>
> The system is a Xen VM running Arch Linux x86_64, presently up to date,
> on an XFS filesystem in an LVM2 partition. After recently updating my
> mail server, I found that a sieve rule I had which would check
> X-Spam-Score for a value over a certain number, in my case 2.5. In my
> most recent update, negative values would trip the rule.
>
> Here's the rule in question:
>
> # rule:[Spam Filter Subject]
> if anyof (header :contains "Subject" "[SPAM]", header :value "gt"
> :comparator "i;as
> cii-numeric" "X-Spam-Score" "2.5")
> {
> fileinto "Spam Box";
> stop;
> }
http://tools.ietf.org/html/rfc5231#section-3 :
`Note: the "i;ascii-numeric" comparator does not support negative numbers.`
> I have a successful work-around by checking the numerical value and also
> insuring that the header doesn't contain a '-', and things work as they
> should. Possible the bug could be in my Sieve interface, which is a
> RoundCube plugin. Otherwise things are working great.
>
> If there's anything I can add, please let me know. Thanks!
Checking for a minus is a good workaround.
However, there is also a special set of nice Sieve extensions for the
purpose of checking spam score: http://tools.ietf.org/html/rfc5235 . It
requires some configuration at the server
(http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/SpamtestVirustest), so
it may not always be available. Of course, Roundcube also needs to
support it for it to be useful, but I am not sure whether it can
normally use those extensions. A quick peek at the sources of the
managesieve plugin shows that it probably doesn't support the spamtest
extension:
https://github.com/roundcube/roundcubemail/blob/master/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php#L29
I also took a quick peek at the source code of JohnDoh's sieverules
plugin for RoundCube, and it looks like that one does have support for
it. Note that that is a different (more feature-rich) Sieve plugin than
the managesieve plugin included in the RoundCube distribution itself.
Regards,
Stephan.
More information about the dovecot
mailing list