postfix: add relayPort option. (#30520)

This commit is contained in:
Drew Hess 2017-10-25 10:11:55 -07:00 committed by Joachim Schiele
parent 2351947c57
commit ad933bb096

View file

@ -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;