dovecot-2.2: mail-log: If uid field is used, make sure newly sav...

dovecot at dovecot.org dovecot at dovecot.org
Tue Dec 1 15:31:21 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/25d63d9c7f5a
changeset: 19443:25d63d9c7f5a
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 01 17:31:08 2015 +0200
description:
mail-log: If uid field is used, make sure newly saved mails actually get an UID.
With Maildir the UID is otherwise assigned on mail deliveries only if
dovecot-uidlist happens to get locked.

diffstat:

 src/plugins/mail-log/mail-log-plugin.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 374db78da9f0 -r 25d63d9c7f5a src/plugins/mail-log/mail-log-plugin.c
--- a/src/plugins/mail-log/mail-log-plugin.c	Tue Dec 01 16:45:37 2015 +0200
+++ b/src/plugins/mail-log/mail-log-plugin.c	Tue Dec 01 17:31:08 2015 +0200
@@ -263,6 +263,8 @@
 			   this consistently with all mailbox formats */
 			mail_log_append_uid(ctx, msg, text, 0);
 		}
+		/* make sure UID is assigned to this mail */
+		mail->transaction->flags |= MAILBOX_TRANSACTION_FLAG_ASSIGN_UIDS;
 		str_append(text, ", ");
 	}
 	if ((muser->fields & MAIL_LOG_FIELD_MSGID) != 0) {


More information about the dovecot-cvs mailing list