[Dovecot] Sieve "header :value" test does not work
Stephan Bosch
stephan at rename-it.nl
Wed Sep 7 18:06:50 EEST 2011
On 9/7/2011 4:17 PM, Tom Hendrikx wrote:
> Thanks for the idea :)
> My first alternative way of thinking was to put the header value in a
> variable, then multiply it by 10000 (in my actual issue, the fraction
> always has 4 characters), then handle it as an int. However, doing a
> calculation is also not supported.
>
> I was trying to do some nifty stuff with DSPAM headers, which adds
> header that indicates "Spam" or "Innocent", and a fractional value
> between 0 and 1 that indicates the confidence that the filter has in its
> own classification:
>
> X-DSPAM-Result: Spam
> X-DSPAM-Confidence: 0.9456
> ==> quite sure it is spam
>
> X-DSPAM-Result: Innocent
> X-DSPAM-Confidence: 0.9889
> ==> even more sure that it is not spam
>
> Based on these headers, I wanted to do something with messages that the
> filter was really sure about, like pushing them to spamcop.
>
> Combining these headers in the sieve spamtest configuration to create a
> sliding scale between 1 and 10 is not really possible.
>
Not with the current implementation, no. But I could incorporate this
new type of specification in the configuration capabilities. Using the
spamtest :percent test, this could for instance map as follows:
Result=Innocent; Confidence=0.0000 - 1.0000 => spamtest :percent yields
50 - 0
Result=Spam; Confidence=0.0000 - 1.0000 => spamtest :percent yields 50 -
100
Other mappings are possible of course.
Regards,
Stephan.
More information about the dovecot
mailing list