summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2017-01-02 15:42:51 +0100
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2017-01-02 15:42:51 +0100
commit65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a (patch)
tree90fc7d1448b2c16c4a0990f980451bd54ca2b0b9 /nixos
parent58fa71b39c9e5d0af7b8329a0c3ebf99f305bc71 (diff)
downloadnixlib-65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a.tar
nixlib-65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a.tar.gz
nixlib-65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a.tar.bz2
nixlib-65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a.tar.lz
nixlib-65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a.tar.xz
nixlib-65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a.tar.zst
nixlib-65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a.zip
postgrey: improve formatting
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/mail/postgrey.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/nixos/modules/services/mail/postgrey.nix b/nixos/modules/services/mail/postgrey.nix
index 7db4e4d1c21e..d4ae25c066ac 100644
--- a/nixos/modules/services/mail/postgrey.nix
+++ b/nixos/modules/services/mail/postgrey.nix
@@ -166,7 +166,23 @@ in {
       '';
       serviceConfig = {
         Type = "simple";
-        ExecStart = ''${pkgs.postgrey}/bin/postgrey ${bind-flag} --group=postgrey --user=postgrey --dbdir=/var/postgrey --delay=${toString cfg.delay} --max-age=${toString cfg.maxAge} --retry-window=${toString cfg.retryWindow} ${if cfg.lookupBySubnet then "--lookup-by-subnet" else "--lookup-by-host"} --ipv4cidr=${toString cfg.IPv4CIDR} --ipv6cidr=${toString cfg.IPv6CIDR} ${optionalString cfg.privacy "--privacy"} --auto-whitelist-clients=${toString (if cfg.autoWhitelist == null then 0 else cfg.autoWhitelist)} --greylist-text="${cfg.greylistText}" --x-greylist-header="${cfg.greylistHeader}" --greylist-action=${cfg.greylistAction} ${concatMapStringsSep " " (x: "--whitelist-clients=" + x) cfg.whitelistClients} ${concatMapStringsSep " " (x: "--whitelist-recipients=" + x) cfg.whitelistRecipients}'';
+        ExecStart = ''${pkgs.postgrey}/bin/postgrey \
+          ${bind-flag} \
+          --group=postgrey --user=postgrey \
+          --dbdir=/var/postgrey \
+          --delay=${toString cfg.delay} \
+          --max-age=${toString cfg.maxAge} \
+          --retry-window=${toString cfg.retryWindow} \
+          ${if cfg.lookupBySubnet then "--lookup-by-subnet" else "--lookup-by-host"} \
+          --ipv4cidr=${toString cfg.IPv4CIDR} --ipv6cidr=${toString cfg.IPv6CIDR} \
+          ${optionalString cfg.privacy "--privacy"} \
+          --auto-whitelist-clients=${toString (if cfg.autoWhitelist == null then 0 else cfg.autoWhitelist)} \
+          --greylist-action=${cfg.greylistAction} \
+          --greylist-text="${cfg.greylistText}" \
+          --x-greylist-header="${cfg.greylistHeader}" \
+          ${concatMapStringsSep " " (x: "--whitelist-clients=" + x) cfg.whitelistClients} \
+          ${concatMapStringsSep " " (x: "--whitelist-recipients=" + x) cfg.whitelistRecipients}
+        '';
         Restart = "always";
         RestartSec = 5;
         TimeoutSec = 10;