From 7f55f43b21dedcb100b46a740638db07ca44ff57 Mon Sep 17 00:00:00 2001 From: Imran Haider Date: Sat, 20 Jun 2015 17:00:03 -0400 Subject: [PATCH 1/2] Enable submission service by default --- postfix/files/master.cf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postfix/files/master.cf b/postfix/files/master.cf index 47c7a11..bebcc01 100644 --- a/postfix/files/master.cf +++ b/postfix/files/master.cf @@ -14,10 +14,10 @@ smtp inet n - - - - smtpd #smtpd pass - - - - - smtpd #dnsblog unix - - - - 0 dnsblog #tlsproxy unix - - - - 0 tlsproxy -#submission inet n - - - - smtpd +submission inet n - - - - smtpd # -o syslog_name=postfix/submission -# -o smtpd_tls_security_level=encrypt -# -o smtpd_sasl_auth_enable=yes + -o smtpd_tls_security_level=encrypt + -o smtpd_sasl_auth_enable=yes # -o smtpd_reject_unlisted_recipient=no # -o smtpd_client_restrictions=$mua_client_restrictions # -o smtpd_helo_restrictions=$mua_helo_restrictions From d150baea1d4dd6524dc74f213bc0722678dfe93c Mon Sep 17 00:00:00 2001 From: Imran Haider Date: Sat, 11 Jul 2015 05:58:18 -0400 Subject: [PATCH 2/2] Conditionally enable submission service --- pillar.example | 3 +++ postfix/files/master.cf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pillar.example b/pillar.example index e3239d8..5217977 100644 --- a/pillar.example +++ b/pillar.example @@ -1,5 +1,8 @@ postfix: manage_master_config: True + master_config: + enable_submission: False + config: smtpd_banner: $myhostname ESMTP $mail_name biff: 'no' diff --git a/postfix/files/master.cf b/postfix/files/master.cf index bebcc01..6456810 100644 --- a/postfix/files/master.cf +++ b/postfix/files/master.cf @@ -1,3 +1,4 @@ +{% set master_config = salt['pillar.get']('postfix:master_config', {}) -%} # # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master" or @@ -14,6 +15,7 @@ smtp inet n - - - - smtpd #smtpd pass - - - - - smtpd #dnsblog unix - - - - 0 dnsblog #tlsproxy unix - - - - 0 tlsproxy +{% if master_config.get('enable_submission', False) %} submission inet n - - - - smtpd # -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt @@ -25,6 +27,7 @@ submission inet n - - - - smtpd # -o smtpd_recipient_restrictions= # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING +{% endif %} #smtps inet n - - - - smtpd # -o syslog_name=postfix/smtps # -o smtpd_tls_wrappermode=yes