Bläddra i källkod

Merge pull request #5356 from sriccio/fix-postfix-merge-order

Fix main.cf merging order
Patrick Schult 2 år sedan
förälder
incheckning
5c886d2f4e
1 ändrade filer med 6 tillägg och 4 borttagningar
  1. 6 4
      data/Dockerfiles/postfix/postfix.sh

+ 6 - 4
data/Dockerfiles/postfix/postfix.sh

@@ -436,6 +436,12 @@ 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
@@ -443,10 +449,6 @@ echo -e "myhostname = ${MAILCOW_HOSTNAME}\n$(cat /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