mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-03-21 05:57:59 +05:00
dovecot: use expanded variable names
Since Dovecot 2.4 does not accept short notations for variables any more https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html#variable-expansion the long form needs to be used: %u => %{user} %n => %{username} %d => %{domain} This is backwards compatible with dovecot 2.3 as well: https://doc.dovecot.org/2.3/configuration_manual/config_file/config_variables/#user-variables
This commit is contained in:
parent
9b5df96132
commit
0c40a0b2c6
@ -290,8 +290,8 @@ in
|
||||
|
||||
userFilter = mkOption {
|
||||
type = types.str;
|
||||
default = "mail=%u";
|
||||
example = "(&(objectClass=inetOrgPerson)(mail=%u))";
|
||||
default = "mail=%{user}";
|
||||
example = "(&(objectClass=inetOrgPerson)(mail=%{user}))";
|
||||
description = ''
|
||||
Filter for user lookups in Dovecot.
|
||||
|
||||
@ -315,8 +315,8 @@ in
|
||||
|
||||
passFilter = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "mail=%u";
|
||||
example = "(&(objectClass=inetOrgPerson)(mail=%u))";
|
||||
default = "mail=%{user}";
|
||||
example = "(&(objectClass=inetOrgPerson)(mail=%{user}))";
|
||||
description = ''
|
||||
Filter for password lookups in Dovecot.
|
||||
|
||||
|
@ -33,9 +33,9 @@ let
|
||||
|
||||
# maildir in format "/${domain}/${user}"
|
||||
dovecotMaildir =
|
||||
"maildir:${cfg.mailDirectory}/%d/%n${maildirLayoutAppendix}${maildirUTF8FolderNames}"
|
||||
"maildir:${cfg.mailDirectory}/%{domain}/%{username}${maildirLayoutAppendix}${maildirUTF8FolderNames}"
|
||||
+ (lib.optionalString (cfg.indexDir != null)
|
||||
":INDEX=${cfg.indexDir}/%d/%n"
|
||||
":INDEX=${cfg.indexDir}/%{domain}/%{username}"
|
||||
);
|
||||
|
||||
postfixCfg = config.services.postfix;
|
||||
@ -177,8 +177,8 @@ in
|
||||
protocols = lib.optional cfg.enableManageSieve "sieve";
|
||||
|
||||
pluginSettings = {
|
||||
sieve = "file:${cfg.sieveDirectory}/%u/scripts;active=${cfg.sieveDirectory}/%u/active.sieve";
|
||||
sieve_default = "file:${cfg.sieveDirectory}/%u/default.sieve";
|
||||
sieve = "file:${cfg.sieveDirectory}/%{user}/scripts;active=${cfg.sieveDirectory}/%{user}/active.sieve";
|
||||
sieve_default = "file:${cfg.sieveDirectory}/%{user}/default.sieve";
|
||||
sieve_default_name = "default";
|
||||
};
|
||||
|
||||
@ -329,7 +329,7 @@ in
|
||||
userdb {
|
||||
driver = ldap
|
||||
args = ${ldapConfFile}
|
||||
default_fields = home=/var/vmail/ldap/%u uid=${toString cfg.vmailUID} gid=${toString cfg.vmailUID}
|
||||
default_fields = home=/var/vmail/ldap/%{user} uid=${toString cfg.vmailUID} gid=${toString cfg.vmailUID}
|
||||
}
|
||||
''}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user