[Dovecot] Sieve's spamtest always returns 0
martin f krafft
madduck at madduck.net
Fri Dec 27 20:53:33 EET 2013
also sprach martin f krafft <madduck at madduck.net> [2013-12-27 18:04 +1300]:
> I tested those regular expressions with sed -r, e.g.
> % sed -rne "s@^X-Spam-Status: [^,]*, score=-?[[:digit:]]+\.[[:digit:]] required=(-?[[:digit:]]+\.[[:digit:]]).*@\1 at p" mailfile
> and they work.
> Unfortunately, in sieve scripts, the spamtest value is always 0,
> which is indicative of the spamtest "not having run", which in this
> case I assume means that the regular expression didn't match.
The documentation talks about "POSIX regular expressions", but the
examples use extended regexps. This should probably be clarified.
However, even if I remove the -r in the above sed call and escape
the characters +?(), it does not work. Character classes, such as
[:digit:] are available in regular POSIX regexps, to my knowledge.
So: the documentation needs clarification, but my problem remains.
Yes, I could just "text"-match against X-Spam-Flag (which I now do),
but I'd prefer it if the user could match against a spam
probability, e.g. already filter if SpamAssassin assigns 6 out of 10
martin | http://madduck.net/ | http://two.sentenc.es/
"geld ist das brecheisen der macht."
- friedrich nietzsche
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1124 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
More information about the dovecot