File 0001-Fixed-CALDAV-PUT-requests-while-proxying.patch of Package cyrus-imapd-3

From 4ceab01d26d7c44af3832c2513abc5deb4133a7d Mon Sep 17 00:00:00 2001
From: "Jeroen van Meeuwen (Apheleia IT)" <vanmeeuwen@apheleia-it.ch>
Date: Tue, 29 Nov 2022 13:05:06 +0100
Subject: [PATCH] Port PR 4302

---
 imap/http_dav.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/imap/http_dav.c b/imap/http_dav.c
index c5c94f8dd..071ff1f6e 100644
--- a/imap/http_dav.c
+++ b/imap/http_dav.c
@@ -7102,7 +7102,7 @@ int meth_put(struct transaction_t *txn, void *params)
     }
 
     /* Make sure mailbox type is correct */
-    if (mbtype_isa(txn->req_tgt.mbentry->mbtype) != txn->req_tgt.namespace->mboxtype)
+    if (mbtype_isa(txn->req_tgt.mbentry->mbtype) != txn->req_tgt.namespace->mboxtype && txn->req_tgt.mbentry->mbtype != MBTYPE_REMOTE)
         return HTTP_FORBIDDEN;
 
     /* Make sure Content-Range isn't specified */
-- 
2.37.3