nixos/postfix: separate list option elements with commas
This commit is contained in:
parent
9bd7798d9c
commit
cb7fe51ee6
@ -15,20 +15,18 @@ let
|
|||||||
haveVirtual = cfg.virtual != "";
|
haveVirtual = cfg.virtual != "";
|
||||||
|
|
||||||
clientAccess =
|
clientAccess =
|
||||||
if (cfg.dnsBlacklistOverrides != "")
|
optional (cfg.dnsBlacklistOverrides != "")
|
||||||
then [ "check_client_access hash:/etc/postfix/client_access" ]
|
"check_client_access hash:/etc/postfix/client_access";
|
||||||
else [];
|
|
||||||
|
|
||||||
dnsBl =
|
dnsBl =
|
||||||
if (cfg.dnsBlacklists != [])
|
optionals (cfg.dnsBlacklists != [])
|
||||||
then [ (concatStringsSep ", " (map (s: "reject_rbl_client " + s) cfg.dnsBlacklists)) ]
|
(map (s: "reject_rbl_client " + s) cfg.dnsBlacklists);
|
||||||
else [];
|
|
||||||
|
|
||||||
clientRestrictions = concatStringsSep ", " (clientAccess ++ dnsBl);
|
clientRestrictions = concatStringsSep ", " (clientAccess ++ dnsBl);
|
||||||
|
|
||||||
mainCf = let
|
mainCf = let
|
||||||
escape = replaceStrings ["$"] ["$$"];
|
escape = replaceStrings ["$"] ["$$"];
|
||||||
mkList = items: "\n " + concatStringsSep "\n " items;
|
mkList = items: "\n " + concatStringsSep ",\n " items;
|
||||||
mkVal = value:
|
mkVal = value:
|
||||||
if isList value then mkList value
|
if isList value then mkList value
|
||||||
else " " + (if value == true then "yes"
|
else " " + (if value == true then "yes"
|
||||||
|
Loading…
Reference in New Issue
Block a user