Skip to content

Commit

Permalink
Merge pull request #5356 from sriccio/fix-postfix-merge-order
Browse files Browse the repository at this point in the history
Fix main.cf merging order
  • Loading branch information
FreddleSpl0it authored Aug 2, 2023
2 parents 57d849a + 7cda9f0 commit 5c886d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions data/Dockerfiles/postfix/postfix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -436,17 +436,19 @@ EOF
fi

sed -i '/User overrides/q' /opt/postfix/conf/main.cf

# Append postscreen dnsbl sites to main.cf
cat /opt/postfix/conf/dns_blocklists.cf >> /opt/postfix/conf/main.cf
cat /tmp/spamhaus.cf >> /opt/postfix/conf/main.cf

# Append user overrides
echo >> /opt/postfix/conf/main.cf
touch /opt/postfix/conf/extra.cf
sed -i '/myhostname/d' /opt/postfix/conf/extra.cf
echo -e "myhostname = ${MAILCOW_HOSTNAME}\n$(cat /opt/postfix/conf/extra.cf)" > /opt/postfix/conf/extra.cf

cat /opt/postfix/conf/extra.cf >> /opt/postfix/conf/main.cf

# Append postscreen dnsbl sites to main.cf
cat /opt/postfix/conf/dns_blocklists.cf >> /opt/postfix/conf/main.cf
cat /tmp/spamhaus.cf >> /opt/postfix/conf/main.cf

if [ ! -f /opt/postfix/conf/custom_transport.pcre ]; then
echo "Creating dummy custom_transport.pcre"
touch /opt/postfix/conf/custom_transport.pcre
Expand Down

0 comments on commit 5c886d2

Please sign in to comment.