To configure exim4 to use O2’s SMTP server for outbound mail:
(As root) edit /etc/exim4/passwd.client and add your O2 portal authentication credentials.
See ‘man exim4_passwd_client’ for how exim4 parses this file.
Note that smtp.o2.co.uk resolves to the IP address 82.132.141.69, but the reverse DNS for that IP address resolves to mail.o2.co.uk, so you will need to use that name in passwd.client.
The line in passwd.client should look something like this:
mail.o2.co.uk:yourname@o2.co.uk:your_password
O2’s mail servers don’t support TLS so you will need to add the following line to /etc/exim4/exim4.conf.localmacros (just create the file if it doesn’t exist already)
AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS = true
This allows passwords to be sent over an insecure connection. It’s far from ideal but nothing can be done until O2 supports TLS.
Finally run ‘dpkg-reconfigure exim4-config’ to update the mail server configuration.
Select ‘mail sent by smarthost; received via SMTP or fetchmail‘ and when it asks for the smarthost address use smtp.o2.co.uk.
You should now be sending email using O2’s smarthost.
Check /var/log/exim4/mainlog when sending mail to confirm that everything is OK.
Pingback: Sending email from an O2 Broadband connection « WebDiary.com
On Debian unstable (Aug 2011) I had to put the localmacros file in /etc/exim4/conf.d/ for mail to be sent and accepted. For example:
/etc/exim4/conf.d/auth/10_exim4-config_localmacros
Also: although yourname@o2.co.uk is ok, yourname is acceptable.