Previously it was set only when some error noticed that there was a problem
accessing the mail. Now this is set immediately in mail_set_seq(). This
allows e.g. IMAP COPY/MOVE to abort when it encounters expunged mails.
mail_set_expunged(&mail->mail.mail);
return;
}
+ /* Allow callers to easily find out if this mail was already expunged
+ by another session. It's possible that it could still be
+ successfully accessed. */
+ if (mail_index_is_expunged(_mail->transaction->view, seq))
+ mail_set_expunged(&mail->mail.mail);
if (!mail->mail.search_mail) {
index_mail_update_access_parts_pre(_mail);