mail-server/dovecot: check if quota is non-null instead of string

This commit is contained in:
Leon Schuermann 2025-05-06 02:27:36 +00:00 committed by Martin Weinelt
parent 7091fad860
commit 6f3ece9181

View File

@ -125,9 +125,7 @@ let
cat <<EOF > ${userdbFile}
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value:
"${name}:::::::"
+ (if lib.isString value.quota
then "userdb_quota_rule=*:storage=${value.quota}"
else "")
+ lib.optionalString (value.quota != null) "userdb_quota_rule=*:storage=${value.quota}"
) cfg.loginAccounts)}
EOF
'';