Mercurial > dovecot > core-2.2
changeset 21645:a66e16598d6e
lib-lda: Do not involve mail-deliver plugin unnecessarely
If no mail delivery by LDA/LMTP is being done, do not
hook into the process.
Fixes signal 11 crash with lazy-expunge.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Mon, 20 Feb 2017 14:50:39 +0200 |
parents | eb6a6d44d977 |
children | 7f927c405b2f |
files | src/lib-lda/mail-deliver.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-lda/mail-deliver.c Mon Feb 20 14:26:41 2017 +0200 +++ b/src/lib-lda/mail-deliver.c Mon Feb 20 14:50:39 2017 +0200 @@ -599,6 +599,13 @@ { 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;