]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Incremental sync sometimes missed messages when GUIDs weren't available
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 10 Nov 2020 17:57:26 +0000 (19:57 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 12 Nov 2020 15:01:54 +0000 (15:01 +0000)
GUIDs aren't available when using imapc, so this affected migrations.

src/doveadm/dsync/dsync-mailbox-import.c

index fdc699ce53d22a87efa4ea90d8043a6564b509ea..b96a56008eaf2b64c6a7719bf9bbc0eb86fbc193 100644 (file)
@@ -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;
 }