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: [EMAIL PROTECTED]
>   To: [EMAIL PROTECTED]
>   Subject: hello
> 
>   test
> 
>   $ deliver -r [EMAIL PROTECTED] -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" {
    discard;
  }

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 ([EMAIL PROTECTED])
---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Reply via email to