Configure Exim4 on Ubuntu to use GMail as Smart Host
by Alistair Miles
This is just a short post to say that, to configure exim4 to use gmail as a smart host on Ubuntu 9.04, I did only the following, and no more…
user@host:~$ sudo dpkg-reconfigure exim4-config
Choose mail sent by SMARTHOST; received via SMTP or fetchmail.
Machine handling outgoing mail for this host (smarthost):
smtp.gmail.com::587
(All other questions I left as default.)
Then…
user@host:~$ sudo emacs /etc/exim4/passwd.client
…and add the following line:
*:yourAccountName@gmail.com:y0uRpaSsw0RD
Please note, I know next to nothing about exim4 configuration, so caveat emptor.
Looks like the following are also required…
sudo update-exim4.conf
sudo /etc/init.d/exim4 restart
If you have problems, try checking the exim4 log …
sudo tail -f /var/log/exim4/mainlog
Also, if you send mail before authentication is properly configured, you can trigger gmail’s protection against malicious mail sending, which will temporarily disable your account. You can check if the account is OK by logging in to gmail.com.
Thanks. It’s simple and works fine.
SMTP port number is 465..!!
That’s for SSL. TLS is 587.