postfix service: make SMTP services optional using enableSmtp option

This commit is contained in:
Viktor Kleen 2016-01-05 02:57:52 -08:00
parent 550fe7f233
commit 8fad959b15

View file

@ -108,10 +108,14 @@ let
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
''
+ optionalString cfg.enableSmtp ''
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
''
+ ''
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
@ -154,6 +158,11 @@ in
description = "Whether to run the Postfix mail server.";
};
enableSmtp = mkOption {
default = true;
description = "Whether to enable smtp in master.cf.";
};
setSendmail = mkOption {
default = true;
description = "Whether to set the system sendmail to postfix's.";