Skip to content

Commit

Permalink
plugins: imapsieve: Fix assert panic occurring when a COPY event is t…
Browse files Browse the repository at this point in the history
…riggered on a virtual mailbox.

Occurs when several mails from different backend mailboxes are involved in the
COPY event. Fixed by using mail_save_context->>copy_src_mail in mailbox_copy()
instead of the mail argument. The latter can point to the backend mailbox for
virtual mailboxes, which makes no sense to the imapsieve plugin as it expects
only one source mailbox.

Panic was:

Panic: file imap-sieve-storage.c: line 337 (imap_sieve_add_mailbox_copy_event): assertion failed: (ismt->src_box == NULL || ismt->src_box == src_mail->box)
  • Loading branch information
stephanbosch authored and villesavolainen committed Feb 6, 2019
1 parent 67f5896 commit ee04451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/imapsieve/imap-sieve-storage.c
Expand Up @@ -492,7 +492,8 @@ imap_sieve_mailbox_copy(struct mail_save_context *ctx, struct mail *mail)
imap_sieve_mailbox_debug(t->box, "%s event",
(isuser->cur_cmd == IMAP_SIEVE_CMD_COPY ?
"COPY" : "MOVE"));
imap_sieve_add_mailbox_copy_event(t, ctx->dest_mail, mail);
imap_sieve_add_mailbox_copy_event(t, ctx->dest_mail,
ctx->copy_src_mail);
}

return 0;
Expand Down

0 comments on commit ee04451

Please sign in to comment.