mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-06-01 23:47:51 +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 {
|
userFilter = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "mail=%u";
|
default = "mail=%{user}";
|
||||||
example = "(&(objectClass=inetOrgPerson)(mail=%u))";
|
example = "(&(objectClass=inetOrgPerson)(mail=%{user}))";
|
||||||
description = ''
|
description = ''
|
||||||
Filter for user lookups in Dovecot.
|
Filter for user lookups in Dovecot.
|
||||||
|
|
||||||
@ -315,8 +315,8 @@ in
|
|||||||
|
|
||||||
passFilter = mkOption {
|
passFilter = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = "mail=%u";
|
default = "mail=%{user}";
|
||||||
example = "(&(objectClass=inetOrgPerson)(mail=%u))";
|
example = "(&(objectClass=inetOrgPerson)(mail=%{user}))";
|
||||||
description = ''
|
description = ''
|
||||||
Filter for password lookups in Dovecot.
|
Filter for password lookups in Dovecot.
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@ let
|
|||||||
|
|
||||||
# maildir in format "/${domain}/${user}"
|
# maildir in format "/${domain}/${user}"
|
||||||
dovecotMaildir =
|
dovecotMaildir =
|
||||||
"maildir:${cfg.mailDirectory}/%d/%n${maildirLayoutAppendix}${maildirUTF8FolderNames}"
|
"maildir:${cfg.mailDirectory}/%{domain}/%{username}${maildirLayoutAppendix}${maildirUTF8FolderNames}"
|
||||||
+ (lib.optionalString (cfg.indexDir != null)
|
+ (lib.optionalString (cfg.indexDir != null)
|
||||||
":INDEX=${cfg.indexDir}/%d/%n"
|
":INDEX=${cfg.indexDir}/%{domain}/%{username}"
|
||||||
);
|
);
|
||||||
|
|
||||||
postfixCfg = config.services.postfix;
|
postfixCfg = config.services.postfix;
|
||||||
@ -177,8 +177,8 @@ in
|
|||||||
protocols = lib.optional cfg.enableManageSieve "sieve";
|
protocols = lib.optional cfg.enableManageSieve "sieve";
|
||||||
|
|
||||||
pluginSettings = {
|
pluginSettings = {
|
||||||
sieve = "file:${cfg.sieveDirectory}/%u/scripts;active=${cfg.sieveDirectory}/%u/active.sieve";
|
sieve = "file:${cfg.sieveDirectory}/%{user}/scripts;active=${cfg.sieveDirectory}/%{user}/active.sieve";
|
||||||
sieve_default = "file:${cfg.sieveDirectory}/%u/default.sieve";
|
sieve_default = "file:${cfg.sieveDirectory}/%{user}/default.sieve";
|
||||||
sieve_default_name = "default";
|
sieve_default_name = "default";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ in
|
|||||||
userdb {
|
userdb {
|
||||||
driver = ldap
|
driver = ldap
|
||||||
args = ${ldapConfFile}
|
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