]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fixed handling expunges when GUIDs aren't supported by the backend(s).
authorTimo Sirainen <tss@iki.fi>
Wed, 26 Jun 2013 12:29:43 +0000 (15:29 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 26 Jun 2013 12:29:43 +0000 (15:29 +0300)
src/doveadm/dsync/dsync-mailbox-import.c

index cb31260b278ee0a75702d7d9aee9ef3fe17e9c35..57f7b1d6f4f5ee0f9b54bc0633f28f2705d07f43 100644 (file)
@@ -1283,6 +1283,11 @@ dsync_mailbox_import_match_msg(struct dsync_mailbox_importer *importer,
        /* verify hdr_hash if it exists */
        if (change->hdr_hash == NULL) {
                i_assert(*importer->cur_guid == '\0');
+               if (change->type == DSYNC_MAIL_CHANGE_TYPE_EXPUNGE) {
+                       /* the message was already expunged, so we don't know
+                          its header. return "unknown". */
+                       return -1;
+               }
                i_error("Mailbox %s: GUIDs not supported, "
                        "sync with header hashes instead",
                        mailbox_get_vname(importer->box));