This section explains how to set up a local Exim daemon on your computer to use our mail server as a smarthost.
First, run dpkg-reconfigure exim4 and choose to use mail.hcoop.net. In case you missed anything, here is a known working /etc/exim4/update-exim4.conf.conf file. $HOSTNAME is the hostname of your local machine.
dc_eximconfig_configtype='satellite' dc_other_hostnames='$HOSTNAME' dc_local_interfaces='127.0.0.1' dc_readhost='$HOSTNAME' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='mail.hcoop.net' CFILEMODE='644' dc_use_split_config='true' dc_hide_mailname='true' dc_mailname_in_oh='true' dc_localdelivery='mail_spool'
Then, modify the /etc/exim4/passwd.client file to add a mapping for your HCoop username and password.
mail.hcoop.net:$USERNAME:$PASSWORD
Finally, modify /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost as follows. The hosts_require_auth and tls_tempfail_tryclear lines are the most important.
remote_smtp_smarthost:
debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
driver = smtp
# NOTE: Force the connection to be authenticated.
hosts_require_auth = <; ${if exists{CONFDIR/passwd.client} \
{\
${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$host_address}}\
}\
{} \
}
.ifdef REMOTE_SMTP_SMARTHOST_HOSTS_AVOID_TLS
hosts_avoid_tls = REMOTE_SMTP_SMARTHOST_HOSTS_AVOID_TLS
.endif
.ifdef REMOTE_SMTP_HEADERS_REWRITE
headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE
.endif
.ifdef REMOTE_SMTP_RETURN_PATH
return_path = REMOTE_SMTP_RETURN_PATH
.endif
# NOTE: Force the connection to use TLS.
tls_tempfail_tryclear = false