[Dovecot] no sieve with lmtp_save_to_detail_mailbox=yes

Stephan Bosch stephan at rename-it.nl
Thu Mar 6 20:14:16 UTC 2014


On 3/6/2014 5:19 PM, Dennis Kuhn wrote:
> i have a problem with sieve and lmtp_save_to_detail_mailbox = yes. If
> the mailbox "detail" exists everything works fine, but if the mailbox
> detail does not exist then sieve does not work. The .dovecot.sieve.log
> file says
>
> sieve: info: started log at Mar 06 14:28:47.
> error: msgid=<531877EE.7070806 at heinlein-support.de>: failed to store
> into mailbox 'test2': Mailbox doesn't exist: test2.
>
> I think this is the reason why no sieve script is executed, but why is
> sieve here involved?
> Is there any relation between lmtp_save_to_detail_mailbox=yes and sieve
> or is this a bug?
>
> The same sieve file works with the same mailaddress without
> mailextension, so the sieve script is not the reason for the failure.

That setting changes the default `keep;' mailbox from INBOX to whatever
the detail is. You can set lda_mailbox_autocreate=yes to make sure that
the detail folder exists.

If you don't want to create this folder implicitly, you have a bit of an
issue. The use of the detail as the default keep mailbox has existed
since the old CMUSieve plugin and I didn't bother to change this. There
is currently no way to prevent this behavior, other than using `fileinto
"INBOX";' explicitly rather than `keep;'. You can check for the presence
of a detail in the message using the subaddress extension
(http://tools.ietf.org/html/rfc5233) and then do whatever is needed to
prevent this error; i.e. not execute (implicit) keep.

Better yet: you can also turn off this setting and let Sieve do
everything. This way, you can define a default script that recognizes
the detail and stores the mail in the corresponding folder if it exists.
An example is here:
http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples#Plus_Addressed_mail_filtering
. Use the sieve_default setting to configure a default script which is
executed when the user has no active Sieve script. Alternatively, if you
always want a certain action for a detail'ed message, you can force it
using a sieve_before script.

Of course, it all depends a bit on what you're trying to achieve.

Regards,

Stephan.





More information about the dovecot mailing list