mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-04-02 05:44:33 +05:00
mail-server/dovecot: check if quota is non-null instead of string
This check will avoid silently dropping the quota setting when set to a non-string value, and instead yield an evaluation error when e.g., setting it to a number or other type. Suggested-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
6b425d13f5
commit
daa141ef05
@ -125,7 +125,7 @@ let
|
|||||||
cat <<EOF > ${userdbFile}
|
cat <<EOF > ${userdbFile}
|
||||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value:
|
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value:
|
||||||
"${name}:::::::"
|
"${name}:::::::"
|
||||||
+ (if lib.isString value.quota
|
+ (if value.quota != null
|
||||||
then "userdb_quota_rule=*:storage=${value.quota}"
|
then "userdb_quota_rule=*:storage=${value.quota}"
|
||||||
else "")
|
else "")
|
||||||
) cfg.loginAccounts)}
|
) cfg.loginAccounts)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user