Sieve Not Functioning Correctly

Ken Murchison ken at oceana.com
Thu Sep 11 12:38:28 EDT 2003



Raymond Sundland wrote:

> Hello,
> 
> To start, my setup:
> 
> Postfix 2.x calling SpamAssassin's spamc which calls Cyrus 2.2's (ALPHA) 
> deliver.
> 
> As some of you may know, when SpamAssassin sees spam (when it meets a 
> certain level), it creates the header X-Spam-Flag and sets it to YES.  I 
> have created a sieve filter which looks for the X-Spam-Flag and sees if 
> it is YES, and if it is, it should move the mail to another mailbox.
> 
> However, it does not work... I do not know why, and can not figure out 
> why.  Sieve *does* work... in fact, it doesn't seem to work on headers 
> at all.  If I want to do matching, it's against the Sender address... if 
> I do something like List-Id, it won't work.

Works fine here.  Make sure that the mailbox that you're filing into 
exists.  You might also need to use :contains in the test if there is 
trailing whitespace after the "YES".

test.msg:

To: ken at oceana.com, test at oceana.com
Cc: foo at oceana.com
Subject: hsdkjahsdkjashdk
X-Spam-Flag: YES

asdasdasdasd



test.script:

require "fileinto";

if header "x-spam-flag" "yes" {
   fileinto "INBOX.Junk";
}



[ken at eagle sieve]$ ./sievec test.script test.bc
[ken at eagle sieve]$ ./test test.msg test.bc
filing message 'test.msg' into 'Junk'


-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp





More information about the Info-cyrus mailing list