changeset 19443:25d63d9c7f5a

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.
author Timo Sirainen <tss@iki.fi>
date Tue, 01 Dec 2015 17:31:08 +0200
parents 374db78da9f0
children 2f823d983832
files src/plugins/mail-log/mail-log-plugin.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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) {