Yann "Bug" Dubois

Développeur WordPress freelance à Paris
Flux RSS

Configure exim4 to bypass local delivery on web server

17 April 2014 Par : Yann Dubois Catégorie : English, tech

If you need to configure exim4 on a web-server to route outgoing mail but do not want the web server to perform local delivery of e-mail addressed to your own domain name, the simplest way is to configure a “hubbed host” for your local domain. This will route all e-mails to your local domain through an external mail exchanger, and disable local delivery of e-mail to your own domain. And avoids the dreadful “Unrouteable address” error message.

On a debian server, just add a file named hubbed_hosts in /etc/exim4 like this:

sudo vi /etc/exim4/hubbed_hosts

The file will contain a single line:

yourdomain.com: mx.external.com

For example, if your local domain’s e-mail addresses are hosted with Google’s Gmail service, the line would look like this:

yourdomain.com:    aspmx.l.google.com

Press esc : x to save the file and exit vi, then restart your exim4 mail server:

sudo service restart exim4

…from now on, all your local mail will be forwarded through the external mail hub you specified (ie through Gmail in the latest example)

You can check out exim’s mail log to verify everything is fine:

tail -f /var/log/exim4/mainlog


A lire également...


There has been a critical error on your website.<\/p>

Learn more about debugging in WordPress.<\/a><\/p>","data":{"status":500},"additional_errors":[]}