summary refs log tree commit diff
path: root/nixos/modules/services/mail
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2017-01-02 15:27:00 +0100
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2017-01-02 15:27:00 +0100
commit3c0d02c3877bea0d796ff3617a3f4e828295b56d (patch)
treec207857ee96be2839d6c48a307aea2ed40bee599 /nixos/modules/services/mail
parente2dd0799a8cf252d4a8b59006f7b43fa536ee3fb (diff)
downloadnixlib-3c0d02c3877bea0d796ff3617a3f4e828295b56d.tar
nixlib-3c0d02c3877bea0d796ff3617a3f4e828295b56d.tar.gz
nixlib-3c0d02c3877bea0d796ff3617a3f4e828295b56d.tar.bz2
nixlib-3c0d02c3877bea0d796ff3617a3f4e828295b56d.tar.lz
nixlib-3c0d02c3877bea0d796ff3617a3f4e828295b56d.tar.xz
nixlib-3c0d02c3877bea0d796ff3617a3f4e828295b56d.tar.zst
nixlib-3c0d02c3877bea0d796ff3617a3f4e828295b56d.zip
postgrey: coerce integers
Diffstat (limited to 'nixos/modules/services/mail')
-rw-r--r--nixos/modules/services/mail/postgrey.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/mail/postgrey.nix b/nixos/modules/services/mail/postgrey.nix
index 73f271d2a316..ab0ffe7515db 100644
--- a/nixos/modules/services/mail/postgrey.nix
+++ b/nixos/modules/services/mail/postgrey.nix
@@ -141,7 +141,7 @@ in {
       bind-flag = if cfg.socket ? "path" then
         ''--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}''
       else
-        ''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${cfg.socket.port}'';
+        ''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}'';
     in {
       description = "Postfix Greylisting Service";
       wantedBy = [ "multi-user.target" ];
@@ -153,7 +153,7 @@ in {
       '';
       serviceConfig = {
         Type = "simple";
-        ExecStart = ''${pkgs.postgrey}/bin/postgrey ${bind-flag} --group=postgrey --user=postgrey --dbdir=/var/postgrey --delay=${cfg.delay} --max-age=${cfg.maxAge} --retry-window=${cfg.retryWindow} ${if cfg.lookupBySubnet then "--lookup-by-subnet" else "--lookup-by-host"} --ipv4cidr=${cfg.IPv4CIDR} --ipv6cidr=${cfg.IPv6CIDR} ${optionalString cfg.privacy "--privacy"} --auto-whitelist-clients=${if cfg.autoWhitelist == null then "0" else cfg.autoWhitelist} --greylist-text="${cfg.greylistText}" --x-greylist-header="${cfg.greylistHeader}" --greylist-action=${cfg.greylistAction}'';
+        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}'';
         Restart = "always";
         RestartSec = 5;
         TimeoutSec = 10;