[Dovecot] lmtp sometimes fails to deliver a message to all recipients
Dovecot version: 2.1.3
lmtp config: protocol lmtp { mail_plugins = zlib acl sieve }
Running strace on lmtp reveals that when lmtp delivers a message to multiple recipients it saves the message to a file in the first mailbox and hard links that file to other mailboxes. But when in the meantime of delivery that file is deleted, lmtp fails to deliver the message to remaining mailboxes. For example a message for 46 recipients is delivered by lmtp to the first 12 only (fortunately postfix retries delivery for remaining recipients) and for the rest lmtp logs the following error messages:
lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: msgid=unspecified: failed to store into mailbox 'INBOX': Message was expunged (guid) lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: script /vmail/domain/foo/.dovecot.sieve failed with unsuccessful implicit keep (user logfile /vmail/domain/foo/.dovecot.sieve.log may reveal additional details)
I'm seeing this error for about 10 messages per hour.
Best regards, Artur Zaprzała
On 2.4.2012, at 18.45, Artur Zaprzała wrote:
Running strace on lmtp reveals that when lmtp delivers a message to multiple recipients it saves the message to a file in the first mailbox and hard links that file to other mailboxes. But when in the meantime of delivery that file is deleted, lmtp fails to deliver the message to remaining mailboxes. For example a message for 46 recipients is delivered by lmtp to the first 12 only (fortunately postfix retries delivery for remaining recipients) and for the rest lmtp logs the following error messages:
lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: msgid=unspecified: failed to store into mailbox 'INBOX': Message was expunged (guid) lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: script /vmail/domain/foo/.dovecot.sieve failed with unsuccessful implicit keep (user logfile /vmail/domain/foo/.dovecot.sieve.log may reveal additional details)
Fixed in hg.
Timo Sirainen wrote:
On 2.4.2012, at 18.45, Artur Zaprzała wrote:
Running strace on lmtp reveals that when lmtp delivers a message to multiple recipients it saves the message to a file in the first mailbox and hard links that file to other mailboxes. But when in the meantime of delivery that file is deleted, lmtp fails to deliver the message to remaining mailboxes. For example a message for 46 recipients is delivered by lmtp to the first 12 only (fortunately postfix retries delivery for remaining recipients) and for the rest lmtp logs the following error messages:
lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: msgid=unspecified: failed to store into mailbox 'INBOX': Message was expunged (guid) lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: script /vmail/domain/foo/.dovecot.sieve failed with unsuccessful implicit keep (user logfile /vmail/domain/foo/.dovecot.sieve.log may reveal additional details) Fixed in hg.
Tested with Maildir. Works great. Thanks.
The above problem was appearing when some recipients (including first one) had a sieve filter with discard action for current message. In this case, depending on the pattern of recipients having a sieve discard action, lmtp can create more than one instance of the message for a few dozen recipients. It would be nice if lmtp could create a single hardlinked instance of the message even in this case.
Best regards, Artur Zaprzała
On 4.4.2012, at 19.09, Artur Zaprzała wrote:
lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: msgid=unspecified: failed to store into mailbox 'INBOX': Message was expunged (guid) lmtp(3344, foo@domain): Error: RU1WMnueeU9QDQABxjIODQ: sieve: script /vmail/domain/foo/.dovecot.sieve failed with unsuccessful implicit keep (user logfile /vmail/domain/foo/.dovecot.sieve.log may reveal additional details) Fixed in hg.
Tested with Maildir. Works great. Thanks.
The above problem was appearing when some recipients (including first one) had a sieve filter with discard action for current message. In this case, depending on the pattern of recipients having a sieve discard action, lmtp can create more than one instance of the message for a few dozen recipients. It would be nice if lmtp could create a single hardlinked instance of the message even in this case.
The problem here isn't the discard action, but that Sieve is used at all. The hard linking happens currently only for users who don't have Sieve scripts. I've a plan to fix this, but it's not a simple fix and it's pretty low priority currently.
participants (2)
-
Artur Zaprzała
-
Timo Sirainen