Skip to content
Snippets Groups Projects
Commit 57369d41 authored by Bob Mottram's avatar Bob Mottram
Browse files

Try switching to smarthost

parent 1ec52f9f
No related branches found
No related tags found
No related merge requests found
......@@ -1082,15 +1082,11 @@ function email_smtp_proxy_through_isp {
echo "${isp_smtp_domain}:${isp_smtp_username}:${isp_smtp_password}";
echo "${isp_smtp_domain_alias_line}"; } > /etc/exim4/passwd.client
if ! grep -q 'dc_eximconfig_configtype=' /etc/exim4/update-exim4.conf.conf; then
echo "dc_eximconfig_configtype='satellite'" >> /etc/exim4/update-exim4.conf.conf
echo "dc_eximconfig_configtype='smarthost'" >> /etc/exim4/update-exim4.conf.conf
else
sed -i "s|dc_eximconfig_configtype=.*|dc_eximconfig_configtype='satellite'|g" /etc/exim4/update-exim4.conf.conf
fi
if [ "${isp_smtp_domain_alias}" ]; then
sed -i "s|dc_smarthost=.*|dc_smarthost='${isp_smtp_domain_alias}::${isp_smtp_port}'|g" /etc/exim4/update-exim4.conf.conf
else
sed -i "s|dc_smarthost=.*|dc_smarthost='${isp_smtp_domain}::${isp_smtp_port}'|g" /etc/exim4/update-exim4.conf.conf
sed -i "s|dc_eximconfig_configtype=.*|dc_eximconfig_configtype='smarthost'|g" /etc/exim4/update-exim4.conf.conf
fi
sed -i "s|dc_smarthost=.*|dc_smarthost='${isp_smtp_domain}::${isp_smtp_port}'|g" /etc/exim4/update-exim4.conf.conf
if [[ "$(hostname)" != *'.local' ]]; then
sed -i "s|dc_readhost=.*|dc_readhost='$(hostname)'|g" /etc/exim4/update-exim4.conf.conf
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment