Add ability to override master.cf (#207)

This commit is contained in:
Lauri 2016-06-10 16:20:10 +02:00
parent a267af5efe
commit 4473b5c07d
1 changed files with 13 additions and 1 deletions

View File

@ -203,7 +203,7 @@ touch /etc/postfix/vmailbox && postmap /etc/postfix/vmailbox
touch /etc/postfix/virtual && postmap /etc/postfix/virtual
#
# Override Postfix configuration
# Override Postfix configuration: main.cf
#
if [ -f /tmp/docker-mailserver/postfix-main.cf ]; then
while read line; do
@ -214,6 +214,18 @@ else
echo "No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' not provided."
fi
#
# Override Postfix configuration: master.cf
#
if [ -f /tmp/docker-mailserver/postfix-master.cf ]; then
while read line; do
postconf -M "$line"
done < /tmp/docker-mailserver/postfix-master.cf
echo "Loaded 'config/postfix-master.cf'"
else
echo "No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-master.cf' not provided."
fi
# Support general SASL password
rm -f /etc/postfix/sasl_passwd
if [ ! -z "$SASL_PASSWD" ]; then