From 8fad959b15cba08a11a1f95b2f8fec6f977b06d1 Mon Sep 17 00:00:00 2001 From: Viktor Kleen Date: Tue, 5 Jan 2016 02:57:52 -0800 Subject: [PATCH] postfix service: make SMTP services optional using enableSmtp option --- nixos/modules/services/mail/postfix.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index 3a9e62a0205..c18ed599868 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -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.";