From f0bebd7a6a5773e98eeb77c5342655cb9833104d Mon Sep 17 00:00:00 2001 From: Martin Osvald Date: Wed, 24 Nov 2021 15:49:14 +0100 Subject: [PATCH] Sending email with /usr/lib/cyrus-imapd/deliver fails with code 75 Resolves: #2021532 --- cyrus-imapd.spec | 7 +++++- fix-broken-delivery-to-shared-mailboxes.patch | 25 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 fix-broken-delivery-to-shared-mailboxes.patch diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 4d24884..29a1355 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -14,7 +14,7 @@ Name: cyrus-imapd Version: 3.4.1 -Release: 5%{?dist} +Release: 6%{?dist} %define ssl_pem_file_prefix /etc/pki/%name/%name @@ -56,6 +56,7 @@ Patch2: patch-cyrus-rename-quota Patch4: patch-cyrus-perl-linking Patch5: cyrus-imapd-CVE-2021-33582.patch +Patch6: fix-broken-delivery-to-shared-mailboxes.patch Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config @@ -661,6 +662,10 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %changelog +* Wed Nov 24 2021 Martin Osvald - 3.4.1-6 +- Sending email with /usr/lib/cyrus-imapd/deliver fails with code 75 +- Resolves: #2021532 + * Wed Nov 03 2021 Martin Osvald - 3.4.1-5 - Add fix for CVE-2021-33582 - Resolves: #1994034 diff --git a/fix-broken-delivery-to-shared-mailboxes.patch b/fix-broken-delivery-to-shared-mailboxes.patch new file mode 100644 index 0000000..edcb6d6 --- /dev/null +++ b/fix-broken-delivery-to-shared-mailboxes.patch @@ -0,0 +1,25 @@ +commit a8ccdaf109b85cedfd609678d95f7b7d5fdb91f5 +Author: ellie timoney +Date: Mon Jun 7 12:00:27 2021 +1000 + + lmtpd: shared mailboxes don't have conversations to lock + + Fixes #3488 + +diff --git a/imap/lmtpd.c b/imap/lmtpd.c +index 498bb8765..dc9ca21bc 100644 +--- a/imap/lmtpd.c ++++ b/imap/lmtpd.c +@@ -843,8 +843,10 @@ int deliver(message_data_t *msgdata, char *authuser, + // lock conversations for the duration of delivery, so nothing else can read + // the state of any mailbox while the delivery is half done + struct conversations_state *state = NULL; +- r = conversations_open_user(mbname_userid(mbname), 0/*shared*/, &state); +- if (r) goto setstatus; ++ if (mbname_userid(mbname)) { ++ r = conversations_open_user(mbname_userid(mbname), 0/*shared*/, &state); ++ if (r) goto setstatus; ++ } + + /* local mailbox */ + mydata.cur_rcpt = n;