Support for modifying Postfix' master.cf (#595)

* Support for modifying Postfix' master.cf, using the  syntax, in postfix-master.cf
This commit is contained in:
MadsRC 2017-06-13 13:20:25 +02:00 committed by Thomas VIAL
parent 2e4e65b705
commit 3569aebcb6
4 changed files with 16 additions and 0 deletions

0
config/postfix-master.cf Normal file
View file

View file

@ -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() {

View file

@ -0,0 +1 @@
submission/inet/smtpd_sasl_security_options=noanonymous

View file

@ -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
#