Skip to content

Commit

Permalink
lib-lda: Do not involve mail-deliver plugin unnecessarely
Browse files Browse the repository at this point in the history
If no mail delivery by LDA/LMTP is being done, do not
hook into the process.

Fixes signal 11 crash with lazy-expunge.
  • Loading branch information
cmouse authored and GitLab committed Feb 20, 2017
1 parent 2b8ff10 commit 23070cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib-lda/mail-deliver.c
Expand Up @@ -602,6 +602,13 @@ static void mail_deliver_mailbox_allocated(struct mailbox *box)
{
struct mailbox_vfuncs *v = box->vlast;
union mailbox_module_context *mbox;
struct mail_deliver_user *muser =
MAIL_DELIVER_USER_CONTEXT(box->storage->user);

/* we are doing something other than lda/lmtp delivery
and should not be involved */
if (muser->deliver_ctx == NULL)
return;

mbox = p_new(box->pool, union mailbox_module_context, 1);
mbox->super = *v;
Expand Down

0 comments on commit 23070cb

Please sign in to comment.