I recently enabled sending email from my Debian server (a RaspberryPi) outbound to my ISP's "smarthost": AT&T blocks port-25 for outbound email, and so I had to configure Exim4 to perform the necessary SSL connection and verification.
bind9-host: provides /usr/bin/host, which I used to perform DNS lookups for the SMTP "smarthost" machine AT&T asks us to use ("outbound.att.net".) This comes into play when configuring the /etc/exim4/passwd.client file.
exim4-base, exim4-config, exim4-daemon-light: the Exim4 packages I have installed.
First, you should have an email account provided as part of your Uverse account; for example, mine is something that ends in "@sbcglobal.net". There should also be a password used along with that email address, that can be used to log in to AT&T's own webmail. Anyway, this email account and password represent the authentication information that we will put in /etc/exim4/passwd.client. Follow the comments in that file, but note that the "outbound.att.net" machine (which is the machine listed as the "SMTP" machine by AT&T's own help site) is an alias for several other machine DNS names, due to the reverse-lookup that takes place by Exim4, it is recommended (by the /usr/share/doc/exim4-base/README.Debian.gz file for exim4) to duplicate the lines in passwd.client for all these various machine name aliases (and maintain those over time, as the machine names may change year to year.) My file ended up looking like this (line numbers are just to show how short the file is):
- 9 # Example:
- 10 ### target.mail.server.example:login:password
11 outbound.att.net:firstname.lastname@example.org:some_silly_password 12 smtp-att.mail.yahoo.com:email@example.com:some_silly_password 13 smtp.att.mail.fy4.b.yahoo.com:firstname.lastname@example.org:some_silly_password
Next, I ran 'dpkg-reconfigure exim4-config', and selected 'smarthost' (for the outbound email from my server to my ISP's "smarthost" relay, used for sending email out to someone else.) I entered the 'outbound.att.net::587' information when prompted; the final update-exim4.conf.conf file contained this:
- 19 dc_eximconfig_configtype='smarthost' 20 dc_other_hostnames='foobar1.local;foobar2.dyndns.org;sbcglobal.net'
21 dc_local_interfaces= 22 dc_readhost='foobar2.dyndns.org' 23 dc_relay_domains= 24 dc_minimaldns='false' 25 dc_relay_nets= 26 dc_smarthost='outbound.att.net::587' 27 CFILEMODE='644' 28 dc_use_split_config='false' 29 dc_hide_mailname='true' 30 dc_mailname_in_oh='true' 31 dc_localdelivery='mail_spool'
(again, where the line numbers wouldn't be there of course; I'm showing line numbers through Vim.)
Here, line 20 ("dc_other_hostnames") contains the host names that may be on the email going out (I think); and includes my internal Avahi machine name like "foobar.local", and my Dyndns.com DNS domain name. I don't think the sbcglobal.net entry is needed though--it was just a precaution.)
Line 22 is the name I expect my email address (outside of my local network) to have.
Line 26 is a key part, citing the AT&T Uverse "smarthost" machine, and port to which an SSL or TLS connection will be made. And so on.
Then, I ran 'update-exim4.conf' to process the .conf.conf file above, and restarted exim4 with '/etc/init.d/exim4 restart' as root.
Then, using 'mutt' (or whatever email client you prefer), I attempted to send an email. I watched /var/log/exi4/mainlog (or whatever it is called) and watched Exim4 work. I saw that the email didn't go out as expected: I got an error 553, with a note saying that the email address I was using had not been verified. I was given a URL (that no longer worked) to some Yahoo help page (AT&T Uverse's email is handled by Yahoo) for guidance; some Google searching later provided what I needed: I had to log in to mail.yahoo.com usng my Uverse email/password, and browse over to the settings and account options, and add an additional email address (for email@example.com, for example.) When saving, there was an option for "sending email only" which I selected, which also short-circuited adding additional information. When I then attempted to send another email, I saw success as measured by the Exim4 log, as well as in seeing the email make it out to the intended destination (like a Gmail account, etc.)