Monday, May 18, 2015

Reconfigure Exim mail service

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 comments: