Add the ability to customize the Postfix master configuration

master
kaiyou 7 years ago
parent 213ee1d8b6
commit 1fa01745a3

@ -5,7 +5,7 @@ for VARIABLE in `env | cut -f1 -d=`; do
sed -i "s={{ $VARIABLE }}=${!VARIABLE}=g" /etc/postfix/*.cf
done
# Override Postfix configuration
# Override Postfix main configuration
if [ -f /overrides/postfix.cf ]; then
while read line; do
postconf -e "$line"
@ -15,6 +15,16 @@ else
echo "No extra postfix settings loaded because optional '/overrides/postfix.cf' not provided."
fi
# Override Postfix master configuration
if [ -f /overrides/master.cf ]; then
while read line; do
postconf -M "$line"
done < /overrides/master.cf
echo "Loaded '/overrides/master.cf'"
else
echo "No extra postfix settings loaded because optional '/overrides/master.cf' not provided."
fi
# Include table-map files
if ls -A /overrides/*.map 1> /dev/null 2>&1; then
cp /overrides/*.map /etc/postfix/

Loading…
Cancel
Save