diff --git a/build/run/docker-entrypoint/init.d/30-postfix.sh b/build/run/docker-entrypoint/init.d/30-postfix.sh index 3ef1997..5c28570 100755 --- a/build/run/docker-entrypoint/init.d/30-postfix.sh +++ b/build/run/docker-entrypoint/init.d/30-postfix.sh @@ -33,31 +33,29 @@ fi # Whitelist addmx=(${MYVEMAIL_DOMAIN}) addmx+=(${MYVEMAIL_ADDMX//,/ }) -echo | tee /etc/postfix/{helo_access,rbl_override} >/dev/null +echo | tee /etc/postfix/{helo_access,whitelist_incoming,blacklist_incoming} >/dev/null for domain in ${addmx[@]} do - echo "${domain} OK" | tee -a /etc/postfix/helo_access >/dev/null - echo "/${domain}/ OK Primary and backup mail servers" | tee -a /etc/postfix/rbl_override >/dev/null + echo "${domain} OK Primary and backup mail servers" | tee -a /etc/postfix/{helo_access,whitelist_incoming} >/dev/null done if [ ${MYVEMAIL_WHITELIST} ] then - echo >>/etc/postfix/rbl_override + echo >>/etc/postfix/whitelist_incoming addwhitelist+=(${MYVEMAIL_WHITELIST//,/ }) for whitelist in ${addwhitelist[@]} do - echo "/${whitelist}/ OK Whitelisted address" | tee -a /etc/postfix/rbl_override >/dev/null + echo "${whitelist} OK Whitelisted address" | tee -a /etc/postfix/whitelist_incoming >/dev/null done fi # Blacklist if [ ${MYVEMAIL_BLACKLIST} ] then - echo >>/etc/postfix/rbl_override addblacklist+=(${MYVEMAIL_BLACKLIST//,/ }) for blacklist in ${addblacklist[@]} do - echo "/${blacklist}/ REJECT Blacklisted address" | tee -a /etc/postfix/rbl_override >/dev/null + echo "${blacklist} REJECT Blacklisted address" | tee -a /etc/postfix/blacklist_incoming >/dev/null done fi @@ -72,4 +70,4 @@ setfacl -R -m u:postfix:rx /etc/postfix/sql/ # Start postfix postfix start -postmap /etc/postfix/helo_access /etc/postfix/rbl_override /etc/postfix/smtp_header_checks /etc/postfix/header_checks /etc/postfix/body_checks /etc/postfix/postscreen_access.cidr \ No newline at end of file +postmap /etc/postfix/helo_access /etc/postfix/whitelist_incoming /etc/postfix/blacklist_incoming /etc/postfix/smtp_header_checks /etc/postfix/header_checks /etc/postfix/body_checks /etc/postfix/postscreen_access.cidr \ No newline at end of file