From c10be77a1be259cbf0a4c9004394c27d3614806b Mon Sep 17 00:00:00 2001 From: DerLinkman Date: Fri, 28 Jul 2023 12:13:07 +0200 Subject: [PATCH 1/2] Fixed Syntax error in generate_config.sh --- generate_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate_config.sh b/generate_config.sh index ce550e46f..e42a68fc4 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -59,7 +59,7 @@ else fi detect_bad_asn() { - if [[ curl -s http://fuzzy.mailcow.email/asn_list.txt | grep $(whois -h whois.radb.net $(curl -s http://ipv4.mailcow.email) | grep -i origin | tr -s " " | cut -d " " -f2 | head -1) ]]; then + if curl -s http://fuzzy.mailcow.email/asn_list.txt | grep $(whois -h whois.radb.net $(curl -s http://ipv4.mailcow.email) | grep -i origin | tr -s " " | cut -d " " -f2 | head -1) > /dev/null; then if ! $SPAMHAUS_DQS_KEY; then echo -e "\e[31mYour server's public IP uses an AS that is blocked by Spamhaus to use their DNS blocklists for Postfix." echo -e "\e[31mmailcow did not detected a value for the variable SPAMHAUS_DQS_KEY inside mailcow.conf!" From 952ddb18fd59707b3d68b7908cc599d17aadadc5 Mon Sep 17 00:00:00 2001 From: Christian Hailer Date: Sun, 30 Jul 2023 18:56:52 +0200 Subject: [PATCH 2/2] dns_blocklists.cf isn't appended to main.cf and therefore ineffective #5340 --- data/Dockerfiles/postfix/postfix.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/Dockerfiles/postfix/postfix.sh b/data/Dockerfiles/postfix/postfix.sh index 1b5b383c2..9696fa9f2 100755 --- a/data/Dockerfiles/postfix/postfix.sh +++ b/data/Dockerfiles/postfix/postfix.sh @@ -539,6 +539,9 @@ 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 + if [ ! -f /opt/postfix/conf/custom_transport.pcre ]; then echo "Creating dummy custom_transport.pcre" touch /opt/postfix/conf/custom_transport.pcre