Ubuntu 8.0.4 Hardy Gmail Smarthost setup with Exim4

| No Comments | No TrackBacks
I don't host my own email, it's not something I want to have to manage given the complexities of hosting your own and the many free email providers out there such as Google's gmail. Nevertheless, webapps still need to be able to send mail and most will either use sendmail or SMTP. Unfortunately, setting up your own SMTP server for sending email is also not straightforward because if you cannot receive email, your server may be regarded as a spam provider by the outside world.

My solution is to set up an SMTP server that routes all outgoing email to Gmail using Exim4's Smarthost facility.
The best guide I could find was at http://wiki.debian.org/GmailAndExim4 . It is reproduced here adapted for Ubuntu 8.0.4 which I am running hear. The steps to run as root or via sudo are
  • apt-get install (It should install the light daemon)
  • dpkg-reconfigure exim4-config
    • Choose mail sent by smarthost; no local mail
    • System mail name: Your chosen host name
    • IP-addresses to listen on: 127.0.0.1 (You don't want to allow external connections!)
    • Other destinations for which mail is accepted: Leave blank
    • Visible domain name for local users: Your chosen host name
    • IP address or host name of the outgoing smarthost:  smtp.gmail.com::587
    • Keep number of DNS-queries minimal (Dial-on-Demand)? No
    • Split configuration into small files? Yes
    • Root and postmaster mail recipient: Leave blank
  • pico /etc/exim4/passwd.client or other favourite editor
And add the following lines, substituting yourAccountName and y0uRpaSsw0RD as appropriate
gmail-smtp.l.google.com:yourAccountName@gmail.com:y0uRpaSsw0RD 
*.google.com:yourAccountName@gmail.com:y0uRpaSsw0RD
smtp.gmail.com:yourAccountName@gmail.com:y0uRpaSsw0RD
  • update-exim4.conf
  • /etc/init.d/exim4 restart just for good measure

No TrackBacks

TrackBack URL: http://www.glorat.net/mt-tb.cgi/1

Leave a comment

About this Entry

This page contains a single entry by Glorat published on November 4, 2008 10:11 PM.

I just finished installing Movable Type 4! was the previous entry in this blog.

Judgment day for the streetwise kids - Times Online is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en