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.
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
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

Leave a comment