[Dovecot] sieve filters
Ian P. Christian
pookey at pookey.co.uk
Thu Feb 19 11:42:03 EET 2009
Hi all,
I'm trying to figure out a way of filtering mail from a commercial
anti-spam platform. Unfortunately you need to compare part of one
header against part of another header. I figured I could solve this
using sieve variables and pattern matching, however I'm having little
luck and don't know how to debug sieve issues.
# example headers: must compare 0.00799 against 1:0000 (the 2nd
number in the 2nd header)
# X-pstn-levels: (S: 0.00799/98.42547 CV:99.9000 FC:95.5390 LC:95.5390
R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
# X-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c
if header :matches "X-pstn-levels" "(S: */*"
{
set "score" "${1}";
if header :matches "X-pstn-settings" " ? (*:*) *"
{
fileinto "somewhere";
}
}
The first if appears to match, as if I move the fileinto up there it
works - however it doesn't work as it shown here. Can anyone suggest
why? Can I achieve what I'm trying to do with sieve? How can I go
about debugging scripts?
Thanks,
Ian
More information about the dovecot
mailing list