]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mail_storage_settings_ext_check() - Add warning for deprecated mailbox_d...
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Tue, 1 Jul 2025 13:00:57 +0000 (15:00 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 30 Jul 2025 20:30:44 +0000 (20:30 +0000)
src/config/settings-get.pl
src/lib-storage/mail-storage-settings.c

index 6cbf542b0458d2cc6b8e8fec6c9dcab638bc2517..1937e9e8b34c5069589d1985fbb1bc775874ce4e 100755 (executable)
@@ -23,9 +23,11 @@ print '#include "unichar.h"'."\n";
 print '#include "uri-util.h"'."\n";
 print '#include "hash-method.h"'."\n";
 print '#include "settings.h"'."\n";
+print '#include "master-interface.h"'."\n";
 print '#include "message-header-parser.h"'."\n";
 print '#include "imap-urlauth-worker-common.h"'."\n";
 print '#include "mailbox-list.h"'."\n";
+print '#include "doc.h"'."\n";
 print '#include "all-settings.h"'."\n";
 print '#include <unistd.h>'."\n";
 print '#define CONFIG_BINARY'."\n";
index 23db4f0f0e3d1cb6aa6f20fb607b95daa676522f..3a09bb4cfe72f48fa6c00eca622605765300d1aa 100644 (file)
@@ -15,7 +15,9 @@
 #include "mail-namespace.h"
 #include "mail-storage-private.h"
 #include "mail-storage-settings.h"
+#include "master-interface.h"
 #include "iostream-ssl.h"
+#include "doc.h"
 
 static bool mail_storage_settings_apply(struct event *event, void *_set, const char *key, const char **value, enum setting_apply_flags, const char **error_r);
 static bool mail_storage_settings_ext_check(struct event *event, void *_set, pool_t pool, const char **error_r);
@@ -592,8 +594,8 @@ mail_storage_settings_apply(struct event *event ATTR_UNUSED, void *_set,
 }
 
 static bool
-mail_storage_settings_ext_check(struct event *event ATTR_UNUSED,
-                               void *_set, pool_t pool, const char **error_r)
+mail_storage_settings_ext_check(struct event *event, void *_set, pool_t pool,
+                               const char **error_r)
 {
        struct mail_storage_settings *set = _set;
        struct hash_format *format;
@@ -791,6 +793,14 @@ mail_storage_settings_ext_check(struct event *event ATTR_UNUSED,
                                set->mail_path, set->mail_inbox_path);
                }
        }
+
+       if (getenv(MASTER_IS_PARENT_ENV) != NULL &&
+           set->mailbox_directory_name_legacy) {
+               e_warning(event,
+                         "mailbox_directory_name_legacy=yes has been deprecated and will eventually be removed. See "
+                         DOC_LINK("core/config/mailbox_formats/dbox.html#migrating-away-from-mailbox-directory-name-legacy")
+                         " for an upgrade guide.");
+       }
        return TRUE;
 }