[Dovecot] sieve discard

Eugene Gladchenko eugene at donpac.ru
Fri Sep 19 01:31:40 EEST 2008


Jim,

July 23, 2007, Jim Horner wrote:

JH> Does the keyword/action discard work by default or is there something I have
JH> to do in the configuration to get to work... maybe I missed something on
JH> http://wiki.dovecot.org/LDA/Sieve
JH> I have the following rule:
JH> if anyof (
JH>      header :contains ["Subject"] ["Test Discard"]
JH> ) {
JH>     discard;
JH>     stop;
JH> }
JH> but it delivers to INBOX with or w/o the "stop;".
JH> Using 1.0.2 sieve plug-in.

I remember it was fixed in 1.0.3 but I've got dovecot-sieve-1.1.5_1 and
dovecot-1.1.3 (FreeBSD) right now and it seems to me I've encountered
the similar problem.

My .dovecot.sieve is like the following:

# Reject all mail to webmaster at example.net
if header
   :matches
     ["To", "Cc", "Bcc", "Reply-To", "In-Reply-To"]
     ["webmaster at example.net"] {
   discard;
   stop;
}

I don't need e-mail spammers send to my webmaster at example.net and the
above rules really discard the messages that I send to webmaster at example.net
myself, see:

deliver(eugene): Sep 19 02:17:05 Info: cmusieve: Using sieve path: /home/eugene/.dovecot.sieve
deliver(eugene): Sep 19 02:17:05 Info: cmusieve: Executing script /home/eugene/.dovecot.sievec
deliver(eugene): Sep 19 02:17:05 Info: msgid=<367302207.20080919004558 at example.net>: discarded

But spammers bypass the sieve with ease. I can see messages having the
line "To: webmaster at example.net" in the header and still getting into my
inbox though:

deliver(eugene): Sep 19 01:45:19 Info: cmusieve: Using sieve path: /home/eugene/.dovecot.sieve
deliver(eugene): Sep 19 01:45:19 Info: cmusieve: Executing script /home/eugene/.dovecot.sievec
deliver(eugene): Sep 19 01:45:19 Info: msgid=<01c919ad$ec09ed80$6c589fbe@|andreas>: saved mail to INBOX

Am I doing something wrong?

-- 
Eugene Gladchenko
EVG15-RIPE



More information about the dovecot mailing list