tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
postgrey: improve formatting
Gregor Kleen
9 years ago
65f0ddbd
58fa71b3
+17
-1
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
mail
postgrey.nix
+17
-1
nixos/modules/services/mail/postgrey.nix
···
166
166
'';
167
167
serviceConfig = {
168
168
Type = "simple";
169
169
-
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}'';
169
169
+
ExecStart = ''${pkgs.postgrey}/bin/postgrey \
170
170
+
${bind-flag} \
171
171
+
--group=postgrey --user=postgrey \
172
172
+
--dbdir=/var/postgrey \
173
173
+
--delay=${toString cfg.delay} \
174
174
+
--max-age=${toString cfg.maxAge} \
175
175
+
--retry-window=${toString cfg.retryWindow} \
176
176
+
${if cfg.lookupBySubnet then "--lookup-by-subnet" else "--lookup-by-host"} \
177
177
+
--ipv4cidr=${toString cfg.IPv4CIDR} --ipv6cidr=${toString cfg.IPv6CIDR} \
178
178
+
${optionalString cfg.privacy "--privacy"} \
179
179
+
--auto-whitelist-clients=${toString (if cfg.autoWhitelist == null then 0 else cfg.autoWhitelist)} \
180
180
+
--greylist-action=${cfg.greylistAction} \
181
181
+
--greylist-text="${cfg.greylistText}" \
182
182
+
--x-greylist-header="${cfg.greylistHeader}" \
183
183
+
${concatMapStringsSep " " (x: "--whitelist-clients=" + x) cfg.whitelistClients} \
184
184
+
${concatMapStringsSep " " (x: "--whitelist-recipients=" + x) cfg.whitelistRecipients}
185
185
+
'';
170
186
Restart = "always";
171
187
RestartSec = 5;
172
188
TimeoutSec = 10;