dovecot: restore default mail_index_path

Back in 2.3 the index was by default kept in the maildir. This is also
the default in 2.4, but during the migration I put the dovecot home dir
as the default index path, which is a breaking change and could cause
client resyncs.

Fixes: #359
This commit is contained in:
Martin Weinelt
2026-05-24 03:48:25 +02:00
parent e4e18e01de
commit 4dcd114a2f
+4 -6
View File
@@ -398,9 +398,7 @@ in
fields = { fields = {
home = "${cfg.storage.path}/%{user | domain}/%{user | username}"; home = "${cfg.storage.path}/%{user | domain}/%{user | username}";
inherit (cfg.storage) uid gid; inherit (cfg.storage) uid gid;
mail_index_path = "${ mail_index_path = mkIf (cfg.indexDir != null) "${cfg.indexDir}/%{user | domain}/%{user | username}";
if cfg.indexDir != null then cfg.indexDir else cfg.storage.path
}/%{user | domain }/%{user | username}";
}; };
}; };
"passdb declarative" = { "passdb declarative" = {
@@ -428,9 +426,9 @@ in
fields = { fields = {
home = "${cfg.storage.path}/ldap/%{ldap:${cfg.ldap.attributes.uuid}}"; home = "${cfg.storage.path}/ldap/%{ldap:${cfg.ldap.attributes.uuid}}";
inherit (cfg.storage) uid gid; inherit (cfg.storage) uid gid;
mail_index_path = "${ mail_index_path = mkIf (
if cfg.indexDir != null then cfg.indexDir else cfg.storage.path cfg.indexDir != null
}/ldap/%{ldap:${cfg.ldap.attributes.uuid}}"; ) "${cfg.indexDir}/ldap/%{ldap:${cfg.ldap.attributes.uuid}}";
}; };
ldap_connection_group = "ldap-userdb-conn"; ldap_connection_group = "ldap-userdb-conn";
}; };