https://wiki.debian.org/Exim#TLS_and_authentication Communicating with a smarthost
If, like most home users, you are not actually running an Internet server but instead are using e-mail accounts from an ISP or other company (e.g. gmail, hotmail, yahoo mail, etc.), you will need to communicate with their smtp server to send mail.
Every company seems to configure their server differently and puts different restrictions on how you can send mail. This makes configuring Exim4 difficult to describe as a general case. Adding tls makes things even more complicated. However you should always use tls (if available) so that your login is sent encrypted.
I'm going to describe a setup that should work in most cases when you are sending mail using a single account to a single smarthost.
Select one of the smarthost options when running dpkg-reconfigure exim4-config. When specifying the smarthost, include both the smarthost server name and the port it wants you to use (e.g. example.com::465). Note the double colons.
Add authentication credentials for a specific server to /etc/exim4/passwd.client:
:: (e.g. server.example.com:mymail@example.com:abdc1243)
or specify credentials for every server:
*:: (e.g. *:mymail@example.com:abdc1243)
Add the following lines to /etc/exim4/exim4.conf.localmacros (you may need to create it if it doesn't exist):
MAIN_TLS_ENABLE = 1
REMOTE_SMTP_SMARTHOST_HOSTS_REQUIRE_TLS = *
TLS_ON_CONNECT_PORTS = 465
REQUIRE_PROTOCOL = smtps
Add the following to /etc/exim4/exim4.conf.template after .ifdef REMOTE_SMTP_SMARTHOST_HOSTS_REQUIRE_TLS ... .endif
.ifdef REQUIRE_PROTOCOL
protocol = REQUIRE_PROTOCOL
.endif
Add the following after .ifdef MAIN_TLS_ENABLE
.ifdef TLS_ON_CONNECT_PORTS
tls_on_connect_ports = TLS_ON_CONNECT_PORTS
.endif
The SMTP server may reject mail without a proper ""From:"" address. Add a line to /etc/email-addresses to link each linux user to an email address e.g.
root:sysadmin@example.org
Run update-exim4.conf followed by service exim4 restart