From: Timo Sirainen Date: Wed, 26 Jun 2013 12:29:43 +0000 (+0300) Subject: dsync: Fixed handling expunges when GUIDs aren't supported by the backend(s). X-Git-Tag: 2.2.5~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=173fc9ed37637e4609b1ecc9415a9b92067eeeb2;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fixed handling expunges when GUIDs aren't supported by the backend(s). --- diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index cb31260b27..57f7b1d6f4 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -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));