From 68685ba62180b6ea9a19e36ab0616893d5e81d98 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 10 Nov 2020 19:57:26 +0200 Subject: [PATCH] dsync: Incremental sync sometimes missed messages when GUIDs weren't available GUIDs aren't available when using imapc, so this affected migrations. --- src/doveadm/dsync/dsync-mailbox-import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index fdc699ce53..b96a56008e 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -734,7 +734,7 @@ static void newmail_link(struct dsync_mailbox_importer *importer, } } else { if (remote_uid == 0) { - /* mail exists only locally. we don't want to request + /* mail exists locally. we don't want to request it, and we'll assume it has no duplicate instances. */ return; @@ -878,7 +878,7 @@ static bool dsync_mailbox_try_save_cur(struct dsync_mailbox_importer *importer, array_push_back(&importer->newmails, &newmail); newmail_link(importer, newmail, - save_change == NULL ? 0 : save_change->uid); + newmail->uid_in_local ? 0 : save_change->uid); return remote_saved; } -- 2.47.3