mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-17 21:56:19 +00:00
Add SPF whitelist
This commit is contained in:
parent
d15308a613
commit
74d85e6b94
1 changed files with 12 additions and 4 deletions
|
|
@ -34,19 +34,27 @@ fi
|
||||||
addmx=(${MYVEMAIL_DOMAIN})
|
addmx=(${MYVEMAIL_DOMAIN})
|
||||||
addmx+=(${MYVEMAIL_ADDMX//,/ })
|
addmx+=(${MYVEMAIL_ADDMX//,/ })
|
||||||
echo -n | tee /etc/postfix/{helo_access,{whitelisted,blacklisted}_{domains,emails}} >/dev/null
|
echo -n | tee /etc/postfix/{helo_access,{whitelisted,blacklisted}_{domains,emails}} >/dev/null
|
||||||
|
|
||||||
# echo "/\.outbound\.protection\.outlook\.com$/ OK Outlook services" >/etc/postfix/helo_access
|
|
||||||
|
|
||||||
for domain in ${addmx[@]}
|
for domain in ${addmx[@]}
|
||||||
do
|
do
|
||||||
echo "/^${domain//./\\.}$/ OK Primary and backup mail servers" | tee -a /etc/postfix/{helo_access,whitelisted_domains} >/dev/null
|
echo "/^${domain//./\\.}$/ OK Primary and backup mail servers" | tee -a /etc/postfix/{helo_access,whitelisted_domains} >/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# SPF Whitelist
|
||||||
|
if [ ${MYVEMAIL_WHITELIST_HELO} ]
|
||||||
|
then
|
||||||
|
echo >>/etc/postfix/helo_access
|
||||||
|
addwhitelist_helo=(${MYVEMAIL_WHITELIST_HELO//,/ })
|
||||||
|
for whitelist_helo in ${addwhitelist_helo[@]}
|
||||||
|
do
|
||||||
|
echo "/${whitelist_helo}/ OK Whitelisted SPF" | tee -a /etc/postfix/helo_access >/dev/null
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Whitelist domains or server IP addresses
|
# Whitelist domains or server IP addresses
|
||||||
if [ ${MYVEMAIL_WHITELIST_DOMAINS} ]
|
if [ ${MYVEMAIL_WHITELIST_DOMAINS} ]
|
||||||
then
|
then
|
||||||
echo >>/etc/postfix/whitelisted_domains
|
echo >>/etc/postfix/whitelisted_domains
|
||||||
addwhitelist_domain+=(${MYVEMAIL_WHITELIST_DOMAINS//,/ })
|
addwhitelist_domain=(${MYVEMAIL_WHITELIST_DOMAINS//,/ })
|
||||||
for whitelist_domain in ${addwhitelist_domain[@]}
|
for whitelist_domain in ${addwhitelist_domain[@]}
|
||||||
do
|
do
|
||||||
echo "/^${whitelist_domain//./\\.}$/ OK Whitelisted domain" | tee -a /etc/postfix/whitelisted_domains >/dev/null
|
echo "/^${whitelist_domain//./\\.}$/ OK Whitelisted domain" | tee -a /etc/postfix/whitelisted_domains >/dev/null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue