diff --git a/config/postfix-master.cf b/config/postfix-master.cf new file mode 100644 index 00000000..e69de29b diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index 220a1e0c..a2a6b5de 100644 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -904,6 +904,16 @@ function _setup_postfix_override_configuration() { else notify 'inf' "No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' not provided." fi + if [ -f /tmp/docker-mailserver/postfix-master.cf ]; then + while read line; do + if [[ "$line" =~ ^[a-z] ]]; then + postconf -P "$line" + fi + done < /tmp/docker-mailserver/postfix-master.cf + notify 'inf' "Loaded 'config/postfix-master.cf'" + else + notify 'inf' "No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-master.cf' not provided." + fi } function _setup_postfix_sasl_password() { diff --git a/test/config/postfix-master.cf b/test/config/postfix-master.cf new file mode 100644 index 00000000..a6c1d80d --- /dev/null +++ b/test/config/postfix-master.cf @@ -0,0 +1 @@ +submission/inet/smtpd_sasl_security_options=noanonymous diff --git a/test/tests.bats b/test/tests.bats index c8700da2..512aee35 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -391,6 +391,11 @@ load 'test_helper/bats-assert/load' assert_success } +@test "checking postfix: master.cf overrides" { + run docker exec mail grep -q 'submission/inet/smtpd_sasl_security_options=noanonymous' /tmp/docker-mailserver/postfix-master.cf + assert_success +} + # # dovecot #