On 3-1-2024 16:03, Aubry Jaquier via dovecot wrote:
Hello,
I noticed an unusual behavior of the implicit keep from pigeonhole when a redirect fails in a sieve script.
For instance, with the sieve below, if the relay host is unavailable, dovecot will not accept the email and will respond with a tempfail. redirect "myaddress@domain.com"; stop;
But if my sieve script has a fileinto inside (see the example below), dovecot will accept the message, copy the email in the INBOX and in the folder from the fileinto and write the following log "Execution of script filter.sieve failed, but implicit keep was successful" fileinto "Folder"; redirect "myaddress@domain.com"; stop;
According to the RFC 5228, section 2.10.2 Implicit keep, the last example should not trigger an implicit keep but act like the first example. An implicit keep is performed if a message is not written to a mailbox, redirected to a new address, or explicitly thrown out. That is, if a fileinto, a keep, a redirect, or a discard is performed, an implicit keep is not.
Does it look like a bug to you, or is this the intended behaviour ?
Unfortunately, this is intended behavior. The aim is to execute the result of the script atomically (either succeed or fail all actions). However, interactions with external systems cannot be rolled back if something else fails, so those are performed last, after all local storage actions are already committed. There is a choice between duplicate redirects upon retry or this implicit keep behavior you are seeing now. We are still looking into improving this somehow.
Regards,
Stephan.
Best regards,
Aubry
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org