diff --git a/src/freedombone-base-email b/src/freedombone-base-email index 5ac3568535e243c4bc6c5a972e000e8091e7cfa8..81dfda843a2fb306122f9be53e4e78186cad36dc 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -1022,6 +1022,11 @@ function email_smtp_proxy_through_isp { echo '#'; echo '# Example:'; echo '### target.mail.server.example:login:password'; } > /etc/exim4/passwd.client + if ! grep -q 'dc_eximconfig_configtype=' /etc/exim4/update-exim4.conf.conf; then + echo "dc_eximconfig_configtype='internet'" >> /etc/exim4/update-exim4.conf.conf + else + sed -i "s|dc_eximconfig_configtype=.*|dc_eximconfig_configtype='internet'|g" /etc/exim4/update-exim4.conf.conf + fi sed -i "s|dc_smarthost=.*|dc_smarthost=''|g" /etc/exim4/update-exim4.conf.conf else if [[ "$isp_smtp_domain" != *'.'* ]]; then @@ -1042,9 +1047,15 @@ function email_smtp_proxy_through_isp { echo '# see exim4_passwd_client(5) for more documentation'; echo '#'; echo "${isp_smtp_domain}:${isp_smtp_username}:${isp_smtp_password}"; } > /etc/exim4/passwd.client + if ! grep -q 'dc_eximconfig_configtype=' /etc/exim4/update-exim4.conf.conf; then + echo "dc_eximconfig_configtype='smarthost'" >> /etc/exim4/update-exim4.conf.conf + else + 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 fi + update-exim4.conf.template -r update-exim4.conf dpkg-reconfigure --frontend noninteractive exim4-config systemctl restart exim4