mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-17 21:46:17 +00:00
Update build/run/docker-entrypoint/init.d/30-postfix.sh
This commit is contained in:
parent
666c87ac1b
commit
e4ed97c5c6
1 changed files with 6 additions and 8 deletions
|
|
@ -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
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue