I am a bit at a loss here with Sieve (pigeonhole) and the spamtest extension. I am using Dovecot 2.1.7 (backported to Debian squeeze), which comes with Pigeonhole 0.3.0.
Messages are scanned with SpamAssassin, which adds a header like
X-Spam-Status: Yes, score=84.6 required=5.0 tests=…
and so I configured spamtest in conf.d/90-plugin.conf like so:
sieve_spamtest_status_type = score sieve_spamtest_status_header = X-Spam-Status: [^,]*, score=(-?[[:digit:]]+\.[[:digit:]]).* sieve_spamtest_max_header = X-Spam-Status: [^,]*, score=[^[:space:]]+ required=(-?[[:digit:]]+\.[[:digit:]]).*
I tested those regular expressions with sed -r, e.g.
% sed -rne "s@^X-Spam-Status: [^,]*, score=-?[[:digit:]]+\.[[:digit:]] required=(-?[[:digit:]]+\.[[:digit:]]).*@\1@p" mailfile 5.0
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.
Am I right in assuming that the matching happens at the time of evaluation, and so adding the headers using vnd.dovecot.filter just before works?
Or does the spamtest matching happen before the sieve scripts are executed?
Can you see any other reason why spamtest always yields a value of 0?
Thanks,
-- martin | http://madduck.net/ | http://two.sentenc.es/
"those who are faithful know only the trivial side of love: it is the faithless who know love's tragedies." -- oscar wilde
spamtraps: madduck.bogus@madduck.net