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

Variable for server type

parent e15d130e
No related branches found
No related tags found
No related merge requests found
......@@ -1013,6 +1013,7 @@ function email_smtp_proxy_through_isp {
isp_smtp_port="$2"
isp_smtp_username="$3"
isp_smtp_password="$4"
email_server_type='smarthost'
if [[ "$isp_smtp_domain" == 'off' || "$isp_smtp_domain" == '0' || "$isp_smtp_domain" == '' ]]; then
{ echo '# password file used when the local exim is authenticating to a remote';
......@@ -1082,9 +1083,9 @@ function email_smtp_proxy_through_isp {
echo "${isp_smtp_domain_alias_line}";
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
echo "dc_eximconfig_configtype='$email_server_type'" >> /etc/exim4/update-exim4.conf.conf
else
sed -i "s|dc_eximconfig_configtype=.*|dc_eximconfig_configtype='smarthost'|g" /etc/exim4/update-exim4.conf.conf
sed -i "s|dc_eximconfig_configtype=.*|dc_eximconfig_configtype='$email_server_type'|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
......
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