mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-11-11 11:29:17 +05:00
Allow setting userAttrs to empty string
This allows overwriting the default values for user_attrs to be empty which is required when using virtual mailboxes with ldap accounts that have posixAccount attributes set. When user_attrs is empty string those are ignored then.
This commit is contained in:
parent
290a995de5
commit
059b50b2e7
@ -277,7 +277,7 @@ in
|
|||||||
|
|
||||||
dovecot = {
|
dovecot = {
|
||||||
userAttrs = mkOption {
|
userAttrs = mkOption {
|
||||||
type = types.str;
|
type = types.nullOr types.str;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
LDAP attributes to be retrieved during userdb lookups.
|
LDAP attributes to be retrieved during userdb lookups.
|
||||||
|
@ -76,7 +76,7 @@ let
|
|||||||
auth_bind = yes
|
auth_bind = yes
|
||||||
base = ${cfg.ldap.searchBase}
|
base = ${cfg.ldap.searchBase}
|
||||||
scope = ${mkLdapSearchScope cfg.ldap.searchScope}
|
scope = ${mkLdapSearchScope cfg.ldap.searchScope}
|
||||||
${lib.optionalString (cfg.ldap.dovecot.userAttrs != "") ''
|
${lib.optionalString (cfg.ldap.dovecot.userAttrs != null) ''
|
||||||
user_attrs = ${cfg.ldap.dovecot.userAttrs}
|
user_attrs = ${cfg.ldap.dovecot.userAttrs}
|
||||||
''}
|
''}
|
||||||
user_filter = ${cfg.ldap.dovecot.userFilter}
|
user_filter = ${cfg.ldap.dovecot.userFilter}
|
||||||
|
Loading…
Reference in New Issue
Block a user