mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
postgrey: improve formatting
This commit is contained in:
parent
58fa71b39c
commit
65f0ddbd53
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user