The code wrongly thought that metadata lookup couldn't fail because it was
already successfully looked up. But the backend storage could still try to
refresh the mailbox to verify whether it still exists or not, and fail if
it was deleted.
This seems to have affected only the mbox mailbox format.
Broken by
710346bcb884b464c8ed128870fdc1999c13dfd3
array_count(&bbox->sync_pending_removes) > 0 ? 0 :
status.highest_modseq;
- /* The caller already did this successfully, so we simply assert */
if (mailbox_get_metadata(bbox->box, MAILBOX_METADATA_GUID,
- &metadata) < 0)
- i_unreached();
+ &metadata) < 0) {
+ /* Either a temporary failure or the mailbox was already
+ deleted. Either way, it doesn't really matter at this point.
+ We'll just leave the error handling until the next sync. */
+ return;
+ }
if (virtual_bbox_mailbox_equals(bbox, &status, &metadata, &reason) &&
bbox->ondisk_highest_modseq == wanted_ondisk_highest_modseq)