diff options
author | Drew Hess <web-github@drewhess.com> | 2017-10-25 10:11:55 -0700 |
---|---|---|
committer | Joachim Schiele <js@lastlog.de> | 2017-10-25 19:11:55 +0200 |
commit | ad933bb09650311127f139a6d231d7943ee8a1e8 (patch) | |
tree | b9a7672f7b4f86887f5f57c192a87e4fcba40799 /nixos | |
parent | 2351947c574bd05e5d1e4b480b95b71c742767d3 (diff) |
postfix: add relayPort option. (#30520)
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/mail/postfix.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index 2185484827dea..1fef9ac6ec90d 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -62,7 +62,9 @@ let shlib_directory = false; relayhost = if cfg.lookupMX || cfg.relayHost == "" then cfg.relayHost - else "[${cfg.relayHost}]"; + else + "[${cfg.relayHost}]" + + optionalString (cfg.relayPort != null) ":${toString cfg.relayPort}"; mail_spool_directory = "/var/spool/mail/"; setgid_group = setgidGroup; } @@ -458,6 +460,17 @@ in "; }; + relayPort = mkOption { + type = types.nullOr types.int; + default = null; + example = 587; + description = " + Specify an optional port for outbound mail relay. (Note: + only used if an explicit <option>relayHost</option> is + defined.) + "; + }; + lookupMX = mkOption { type = types.bool; default = false; |