]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Add BROKENCHAR to mail_location
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 30 Jun 2017 12:02:40 +0000 (15:02 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 1 Aug 2017 10:48:10 +0000 (13:48 +0300)
This makes the mailbox_list_settings.broken_char configurable. Mainly useful
with imapc when remote server doesn't contain valid mUTF-7 mailbox names.

src/lib-storage/mailbox-list.c

index 2ce4c4df07ae6a8ae3a673519673ef96ef6570c7..27d83084a2b387a33aad3e263a81bc797e4f9922 100644 (file)
@@ -351,6 +351,12 @@ mailbox_list_settings_parse_full(struct mail_user *user, const char *data,
                else if (strcmp(key, "FULLDIRNAME") == 0) {
                        set_r->index_control_use_maildir_name = TRUE;
                        dest = &set_r->maildir_name;
+               } else if (strcmp(key, "BROKENCHAR") == 0) {
+                       if (strlen(value) != 1) {
+                               *error_r = "BROKENCHAR value must be a single character";
+                               return -1;
+                       }
+                       set_r->broken_char = value[0];
                } else if (strcmp(key, "ITERINDEX") == 0) {
                        set_r->iter_from_index_dir = TRUE;
                        continue;