sieve does not seem to be working

Robert Moskowitz rgm at htt-consult.com
Fri Apr 7 00:53:33 EEST 2017


my local.conf has:

#    90-sieve.conf
plugin {
   sieve_before = /home/sieve/globalfilter.sieve
}

and cat /home/sieve/globalfilter.sieve

require ["fileinto","mailbox"];
if anyof
   (
     header :contains "X-Spam-Flag" "YES",
     header :contains "subject" "***SPAM***"
   )
{
   fileinto :create "Spam";
}

There IS a globalfilter.svbin

when I tried:

sendmail -i testit3 at test.htt-consult.com < sample-spam-GTUBE-junk.txt

amavis is flagging it as ***Spam***

but it stays in inbox.  So I tried:

sieve-test -e -l /home/vmail/test.htt-consult.com/testit3/ 
/home/sieve/globalfilter.sieve 
/home/vmail/test.htt-consult.com/testit3/cur/1491512409.M371278P6513.z9m9z.test.htt-consult.com\,S\=1823\,W\=1868\:2\,
info: msgid=<GTUBE1.1010101 at example.net>: stored mail into mailbox 'Spam'.
sieve-test(root): Info: final result: success

And it DID get copied to Spam, not moved.  I am now seeing it in inbox 
and Spam.  Of course ownership on the message in Spam were wrong 
(root:root instead of vmail:mail, but I fixed that).

So two questions, probably linked:

Why did sieve not work.  Is the subject test case sensitive?

If it is case sensitive, why did the sieve-test work?

thanks



More information about the dovecot mailing list