[Dovecot] sieve problem email silently discard

Stephan Bosch stephan at rename-it.nl
Mon Jul 4 00:57:06 EEST 2011


On 07/03/2011 10:22 PM, ml at smtp.fakessh.eu wrote:
> 
> I met a few times the problem or an email that passes through a sieve script 
> is silently discard
> after delivery but never returned to the inbox
> 
> all testimonials are welcome
[...]
> plugin {
[...]
>   plugin = $mail_plugins  autocreate managesieve  sieve
>   sieve = ~/.dovecot.sieve
>   sieve_before = /var/sieve-scripts/roundcube.sieve
>   sieve_dir = ~/sieve
>   sieve_global_path = whatever
> }

[...]

> egrep lda /var/Log/maillog
[...]
> 2011-07-03 19:47:15lda(fakessh): Debug: sieve: executed before user's 
> script(1): /var/sieve-scripts/roundcube.sieve
[...]
> 2011-07-03 19:47:15lda(fakessh): Debug: sieve: executing script 
> from /var/sieve-scripts/roundcube.svbin
> 2011-07-03 19:47:15lda(fakessh): Info: sieve: 
> msgid=<6EBEE5FC-62B1-4C73-B26E-DEBFD6E26DB6 at shorewall.net>: marked message to 
> be discarded if not explicitly delivered (discard action)
> 

I would not call this a silent discard: it is reported in the log above.
Also, the contents of roundcube.sieve that you showed in an earlier
thread contained a single discard action, which is therefore the only
likely culprit. Now the question boils down to: why is this discard
action triggered? The interesting part of the script is the following:

require ["comparator-i;ascii-numeric","relational"];
if header :value "ge" :comparator "i;ascii-numeric"
["X-Spam-score"]["500"]
{
  discard;
  stop;
}

Since the message is discarded, it will most likely be impossible to
retrieve that message and check why it fires this rule. The relatively
innocent situation would be that your Spam filter truly produces this
interesting score of > 500. A less innocent case would be a bug in the
Sieve interpreter. Either way, we need to have access to one of those
messages that triggers this rule and gets discarded without apparent reason.

My suggestion is to replace that `discard;' action with a `fileinto
:create "Debug";' action (:create creates the folder implicitly; depends
on mailbox extension require) to file messages that would normally be
discarded into a special folder for later evaluation. Alternatively, you
can redirect such messages to a special mail account.

Only then can we trace this problem any deeper.

Regards,

Stephan.





More information about the dovecot mailing list