Projects
home:mollekopf:branches:Kolab:Winterfell
cyrus-imapd
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
cyrus-imapd.spec
Changed
@@ -48,7 +48,8 @@ Patch5: 0001-Fixed-CALDAV-PUT-requests-while-proxying.patch Patch6: 0001-Openssl-3.0-fixes.patch - +Patch7: 0003-Configurable-default-addressbook-display-name.patch +Patch8: 0004-Autocreate-on-PROPFIND.patch Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config
View file
0001-Fixed-CALDAV-PUT-requests-while-proxying.patch
Changed
@@ -1,7 +1,7 @@ From 44855ed9ae645725f03ae87ace647b066e0e74fb Mon Sep 17 00:00:00 2001 From: Christian Mollekopf <mollekopf@apheleia-it.ch> Date: Tue, 4 Oct 2022 13:48:02 +0200 -Subject: PATCH Fixed CALDAV PUT requests while proxying +Subject: PATCH 1/4 Fixed CALDAV PUT requests while proxying txn->req_tgt.namespace->mboxtype is MBTYPE_REMOTE in the proxy. ---
View file
0003-Configurable-default-addressbook-display-name.patch
Added
@@ -0,0 +1,41 @@ +From d894680d087a684196f1af914fc399ca9fb06181 Mon Sep 17 00:00:00 2001 +From: Christian Mollekopf <mollekopf@apheleia-it.ch> +Date: Fri, 21 Oct 2022 12:15:20 +0200 +Subject: PATCH 3/4 Configurable default addressbook display name + +--- + imap/http_carddav.c | 3 ++- + lib/imapoptions | 3 +++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/imap/http_carddav.c b/imap/http_carddav.c +index 0b7e6c7a5..1c9840047 100644 +--- a/imap/http_carddav.c ++++ b/imap/http_carddav.c +@@ -485,7 +485,8 @@ EXPORTED int carddav_create_defaultaddressbook(const char *userid) { + r = mboxlist_lookup(mbname_intname(mbname), NULL, NULL); + if (r == IMAP_MAILBOX_NONEXISTENT) { + r = _create_mailbox(userid, mbname_intname(mbname), +- MBTYPE_ADDRESSBOOK, "personal", ++ MBTYPE_ADDRESSBOOK, ++ config_getstring(IMAPOPT_ADDRESSBOOK_DEFAULT_DISPLAYNAME), + &namespacelock); + } + +diff --git a/lib/imapoptions b/lib/imapoptions +index 5cb8ef7b8..801401dc7 100644 +--- a/lib/imapoptions ++++ b/lib/imapoptions +@@ -109,6 +109,9 @@ are listed with ``<none>''. + hierarchy will be at the toplevel of the shared namespace. A + user's personal addressbook hierarchy will be a child of their Inbox. */ + ++{ "addressbook_default_displayname", "personal", STRING, "3.4.5" } ++/* The displayname to be used when creating a user's 'Default' addressbook. */ ++ + { "admins", "", STRING, "2.3.17" } + /* The list of userids with administrative rights. Separate each userid + with a space. Sites using Kerberos authentication may use +-- +2.37.3 +
View file
0004-Autocreate-on-PROPFIND.patch
Added
@@ -0,0 +1,70 @@ +From 589ff4d046586ea313dea026ca58de52ec504755 Mon Sep 17 00:00:00 2001 +From: Christian Mollekopf <mollekopf@apheleia-it.ch> +Date: Mon, 24 Oct 2022 21:37:34 +0200 +Subject: PATCH 4/4 Autocreate on PROPFIND + +If we don't have existing calendar folders then dav_parse_req_target +fails, because it looks for the base calendar via mupdate. +The new codepath simply attempts to lookup the inbox instead and then +proxies the request to that backend, triggering the autocreate. +This requires that the inbox has been created before though. +--- + imap/http_dav.c | 35 ++++++++++++++++++++++++++++++++++- + 1 file changed, 34 insertions(+), 1 deletion(-) + +diff --git a/imap/http_dav.c b/imap/http_dav.c +index 7c13d783b..2aac8d5bb 100644 +--- a/imap/http_dav.c ++++ b/imap/http_dav.c +@@ -484,6 +484,28 @@ static unsigned long principal_allow_cb(struct request_target_t *tgt) + return tgt->namespace->allow; + } + ++static struct backend *proxy_findinboxserver(const char *userid) ++{ ++ mbentry_t *mbentry = NULL; ++ struct backend *s = NULL; ++ ++ char *inbox = mboxname_user_mbox(userid, NULL); ++ int r = mboxlist_lookup(inbox, &mbentry, NULL); ++ free(inbox); ++ ++ if (r) return NULL; ++ ++ if (mbentry->mbtype & MBTYPE_REMOTE) { ++ s = proxy_findserver(mbentry->server, &http_protocol, ++ httpd_userid, &backend_cached, ++ NULL, NULL, httpd_in); ++ } ++ ++ mboxlist_entry_free(&mbentry); ++ ++ return s; ++} ++ + + /* Parse request-target path in DAV principals namespace */ + static int principal_parse_path(const char *path, struct request_target_t *tgt, +@@ -6116,7 +6138,18 @@ EXPORTED int meth_propfind(struct transaction_t *txn, void *params) + /* Parse the path */ + if (fparams->parse_path) { + r = dav_parse_req_target(txn, fparams); +- if (r) return r; ++ if (r) { ++ ++ struct backend *be; ++ be = proxy_findinboxserver(txn->req_tgt.userid); ++ if (!be) { ++ syslog(LOG_ERR, "Could not find a backend"); ++ return HTTP_UNAVAILABLE; ++ } ++ return http_pipe_req_resp(be, txn); ++ ++ return r; ++ } + } + + /* Make sure method is allowed */ +-- +2.37.3 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.