Skip to content

Commit

Permalink
nixos/postfix: support alternate smtp ports when relaying (#30685)
Browse files Browse the repository at this point in the history
* postfix: support alternate smtp ports when relaying

* fix missing ; after merge
  • Loading branch information
srhb authored and qknight committed Nov 1, 2017
1 parent e1cd08e commit 2ddcdcc
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions nixos/modules/services/mail/postfix.nix
Expand Up @@ -60,11 +60,11 @@ let
manpage_directory = "${pkgs.postfix}/share/man";
html_directory = "${pkgs.postfix}/share/postfix/doc/html";
shlib_directory = false;
relayhost = if cfg.lookupMX || cfg.relayHost == ""
then cfg.relayHost
else
"[${cfg.relayHost}]"
+ optionalString (cfg.relayPort != null) ":${toString cfg.relayPort}";
relayhost = if cfg.relayHost == "" then "" else
if cfg.lookupMX
then "${cfg.relayHost}:${toString cfg.relayPort}"
else "[${cfg.relayHost}]:${toString cfg.relayPort}";

mail_spool_directory = "/var/spool/mail/";
setgid_group = setgidGroup;
}
Expand Down Expand Up @@ -461,13 +461,10 @@ in
};

relayPort = mkOption {
type = types.nullOr types.int;
default = null;
example = 587;
type = types.int;
default = 25;
description = "
Specify an optional port for outbound mail relay. (Note:
only used if an explicit <option>relayHost</option> is
defined.)
SMTP port for relay mail relay.
";
};

Expand Down

0 comments on commit 2ddcdcc

Please sign in to comment.