Blame SOURCES/fix-broken-delivery-to-shared-mailboxes.patch

d3a111
commit a8ccdaf109b85cedfd609678d95f7b7d5fdb91f5
d3a111
Author: ellie timoney <ellie@fastmail.com>
d3a111
Date:   Mon Jun 7 12:00:27 2021 +1000
d3a111
d3a111
    lmtpd: shared mailboxes don't have conversations to lock
d3a111
    
d3a111
    Fixes #3488
d3a111
d3a111
diff --git a/imap/lmtpd.c b/imap/lmtpd.c
d3a111
index 498bb8765..dc9ca21bc 100644
d3a111
--- a/imap/lmtpd.c
d3a111
+++ b/imap/lmtpd.c
d3a111
@@ -843,8 +843,10 @@ int deliver(message_data_t *msgdata, char *authuser,
d3a111
             // lock conversations for the duration of delivery, so nothing else can read
d3a111
             // the state of any mailbox while the delivery is half done
d3a111
             struct conversations_state *state = NULL;
d3a111
-            r = conversations_open_user(mbname_userid(mbname), 0/*shared*/, &state);
d3a111
-            if (r) goto setstatus;
d3a111
+            if (mbname_userid(mbname)) {
d3a111
+                r = conversations_open_user(mbname_userid(mbname), 0/*shared*/, &state);
d3a111
+                if (r) goto setstatus;
d3a111
+            }
d3a111
 
d3a111
             /* local mailbox */
d3a111
             mydata.cur_rcpt = n;