sieve not filtering mail

Albert Chin info-cyrus at
Wed Feb 25 00:42:16 EST 2004

On Tue, Feb 24, 2004 at 10:29:20PM -0600, Albert Chin wrote:
>   $ cat /ext/data/mail/.sieve/c/china/sieve.spam.script
>   if header :contains "Subject" "hello" {
>     discard;
>   }
>   $ cat test.msg
>   From: barney at
>   To: china at
>   Subject: hello
>   test
>   $ deliver -r barney at -m user.china -a china < test.msg
> Why doesn't the filter throw away the message?

Something odd going on. I'm using the following recipe and it's
working for incoming mail but not mail sent via deliver(1). Postfix is
my MTA (delivery via lmtp socket).
  require "reject";

  if header :contains "X-Spam-Flag" "YES" {

I looked at the message sent by deliver and the "X-Sieve" header
exists so apparently sieve was run. I also ran the 'test' program
in the sieve directory against the bytecode of the message above:
  $ ./sievec sieve.spam sieve.spam.bc
  $ ./test test.msg sieve.spam.bc
  discarding message 'test.msg'

albert chin (china at
Home Page:
List Archives/Info:

More information about the Info-cyrus mailing list