File 0003-Configurable-default-addressbook-display-name.patch of Package cyrus-imapd

From 9481178e24b09637ac8df3ceb3db462a9dfabdf5 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 ce2aa2370..a1fdf3718 100644
--- a/imap/http_carddav.c
+++ b/imap/http_carddav.c
@@ -502,7 +502,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 3d43d1c36..c15163265 100644
--- a/lib/imapoptions
+++ b/lib/imapoptions
@@ -113,6 +113,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