# HG changeset patch # User Aki Tuomi # Date 1487595039 -7200 # Node ID a66e16598d6ebe5a35f9da8c3486c84ad1604e28 # Parent eb6a6d44d97734c273d808e698b92e56501b9c4a 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. diff -r eb6a6d44d977 -r a66e16598d6e src/lib-lda/mail-deliver.c --- 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;