mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-18 07:36:18 +00:00
Update build/run/docker-entrypoint/init.d/30-postfix.sh
This commit is contained in:
parent
37b981d34b
commit
0797714d18
1 changed files with 11 additions and 11 deletions
|
|
@ -37,7 +37,7 @@ echo -n | tee /etc/postfix/{helo_access,{whitelisted,blacklisted}_{domains,email
|
||||||
for domain in ${addmx[@]}
|
for domain in ${addmx[@]}
|
||||||
do
|
do
|
||||||
echo "${domain} OK Primary and backup mail servers" | tee -a /etc/postfix/helo_access >/dev/null
|
echo "${domain} OK Primary and backup mail servers" | tee -a /etc/postfix/helo_access >/dev/null
|
||||||
echo "/${domain}/ OK Primary and backup mail servers" | tee -a /etc/postfix/whitelisted_domains >/dev/null
|
echo "/${domain/./\\.}$/ OK Primary and backup mail servers" | tee -a /etc/postfix/whitelisted_domains >/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
# Whitelist domains or server IP addresses
|
# Whitelist domains or server IP addresses
|
||||||
|
|
@ -59,6 +59,8 @@ then
|
||||||
do
|
do
|
||||||
echo "${whitelist_email} OK Whitelisted email" | tee -a /etc/postfix/whitelisted_emails >/dev/null
|
echo "${whitelist_email} OK Whitelisted email" | tee -a /etc/postfix/whitelisted_emails >/dev/null
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
echo "null@null.void OK Dummy entry" >/etc/postfix/whitelisted_emails
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Blacklist domains or server IP addresses
|
# Blacklist domains or server IP addresses
|
||||||
|
|
@ -67,8 +69,10 @@ then
|
||||||
addblacklist_domain+=(${MYVEMAIL_BLACKLIST_DOMAINS//,/ })
|
addblacklist_domain+=(${MYVEMAIL_BLACKLIST_DOMAINS//,/ })
|
||||||
for blacklist_domain in ${addblacklist_domain[@]}
|
for blacklist_domain in ${addblacklist_domain[@]}
|
||||||
do
|
do
|
||||||
echo "/${blacklist_domain}/ OK Blacklisted domain" | tee -a /etc/postfix/blacklisted_domains >/dev/null
|
echo "/${blacklist_domain}/ REJECT Blacklisted domain" | tee -a /etc/postfix/blacklisted_domains >/dev/null
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
echo "/^null.void$/ OK Dummy entry" >/etc/postfix/blacklisted_domains
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Blacklist emails
|
# Blacklist emails
|
||||||
|
|
@ -77,8 +81,10 @@ then
|
||||||
addblacklist_email+=(${MYVEMAIL_BLACKLIST_EMAILS//,/ })
|
addblacklist_email+=(${MYVEMAIL_BLACKLIST_EMAILS//,/ })
|
||||||
for blacklist_email in ${addblacklist_email[@]}
|
for blacklist_email in ${addblacklist_email[@]}
|
||||||
do
|
do
|
||||||
echo "${blacklist_email} OK Blacklisted email" | tee -a /etc/postfix/blacklisted_emails >/dev/null
|
echo "${blacklist_email} REJECT Blacklisted email" | tee -a /etc/postfix/blacklisted_emails >/dev/null
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
echo "null@null.void OK Dummy entry" >/etc/postfix/blacklisted_emails
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Virtual mailboxes
|
# Virtual mailboxes
|
||||||
|
|
@ -97,11 +103,5 @@ postfix start
|
||||||
postmap /etc/postfix/helo_access \
|
postmap /etc/postfix/helo_access \
|
||||||
/etc/postfix/smtp_header_checks /etc/postfix/header_checks \
|
/etc/postfix/smtp_header_checks /etc/postfix/header_checks \
|
||||||
/etc/postfix/body_checks \
|
/etc/postfix/body_checks \
|
||||||
/etc/postfix/postscreen_access.cidr
|
/etc/postfix/postscreen_access.cidr \
|
||||||
for map in /etc/postfix/{whitelisted,blacklisted}_{domains,emails}
|
/etc/postfix/{whitelisted,blacklisted}_{domains,emails}
|
||||||
do
|
|
||||||
if [ -s ${map} ]
|
|
||||||
then
|
|
||||||
postmap ${map}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue