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

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