Add the ability to customize the Postfix master configuration
This commit is contained in:
@@ -5,7 +5,7 @@ for VARIABLE in `env | cut -f1 -d=`; do
|
|||||||
sed -i "s={{ $VARIABLE }}=${!VARIABLE}=g" /etc/postfix/*.cf
|
sed -i "s={{ $VARIABLE }}=${!VARIABLE}=g" /etc/postfix/*.cf
|
||||||
done
|
done
|
||||||
|
|
||||||
# Override Postfix configuration
|
# Override Postfix main configuration
|
||||||
if [ -f /overrides/postfix.cf ]; then
|
if [ -f /overrides/postfix.cf ]; then
|
||||||
while read line; do
|
while read line; do
|
||||||
postconf -e "$line"
|
postconf -e "$line"
|
||||||
@@ -15,6 +15,16 @@ else
|
|||||||
echo "No extra postfix settings loaded because optional '/overrides/postfix.cf' not provided."
|
echo "No extra postfix settings loaded because optional '/overrides/postfix.cf' not provided."
|
||||||
fi
|
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
|
# Include table-map files
|
||||||
if ls -A /overrides/*.map 1> /dev/null 2>&1; then
|
if ls -A /overrides/*.map 1> /dev/null 2>&1; then
|
||||||
cp /overrides/*.map /etc/postfix/
|
cp /overrides/*.map /etc/postfix/
|
||||||
|
|||||||
Reference in New Issue
Block a user