summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorViktor Kleen <viktor@kleen.org>2016-01-05 02:57:52 -0800
committerViktor Kleen <viktor@kleen.org>2016-01-05 02:57:52 -0800
commit8fad959b15cba08a11a1f95b2f8fec6f977b06d1 (patch)
treeb7f8b5a593c0931b3856249a8c8ad90737e62ad0 /nixos
parent550fe7f233b7ccd4b3eec8f16a7b3c07b2845549 (diff)
downloadnixlib-8fad959b15cba08a11a1f95b2f8fec6f977b06d1.tar
nixlib-8fad959b15cba08a11a1f95b2f8fec6f977b06d1.tar.gz
nixlib-8fad959b15cba08a11a1f95b2f8fec6f977b06d1.tar.bz2
nixlib-8fad959b15cba08a11a1f95b2f8fec6f977b06d1.tar.lz
nixlib-8fad959b15cba08a11a1f95b2f8fec6f977b06d1.tar.xz
nixlib-8fad959b15cba08a11a1f95b2f8fec6f977b06d1.tar.zst
nixlib-8fad959b15cba08a11a1f95b2f8fec6f977b06d1.zip
postfix service: make SMTP services optional using enableSmtp option
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/mail/postfix.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix
index 3a9e62a02052..c18ed5998685 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.";