mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
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 != "";
|
||||
|
||||
clientAccess =
|
||||
if (cfg.dnsBlacklistOverrides != "")
|
||||
then [ "check_client_access hash:/etc/postfix/client_access" ]
|
||||
else [];
|
||||
optional (cfg.dnsBlacklistOverrides != "")
|
||||
"check_client_access hash:/etc/postfix/client_access";
|
||||
|
||||
dnsBl =
|
||||
if (cfg.dnsBlacklists != [])
|
||||
then [ (concatStringsSep ", " (map (s: "reject_rbl_client " + s) cfg.dnsBlacklists)) ]
|
||||
else [];
|
||||
optionals (cfg.dnsBlacklists != [])
|
||||
(map (s: "reject_rbl_client " + s) cfg.dnsBlacklists);
|
||||
|
||||
clientRestrictions = concatStringsSep ", " (clientAccess ++ dnsBl);
|
||||
|
||||
mainCf = let
|
||||
escape = replaceStrings ["$"] ["$$"];
|
||||
mkList = items: "\n " + concatStringsSep "\n " items;
|
||||
mkList = items: "\n " + concatStringsSep ",\n " items;
|
||||
mkVal = value:
|
||||
if isList value then mkList value
|
||||
else " " + (if value == true then "yes"
|
||||
|
Loading…
Reference in New Issue
Block a user