How to configure Exim on a cPanel server to use a smart host?

A Smart Host is a SMTP server that will accept mail from another server and then deliver the mail for that server.

For example, server1 is setup to use server2 as a smart host.

Anytime someone sends e-mail on server1 it is automatically relayed to server2 regardless of the MX entrys for the domain.

Server2 then accepts this message, looks up the proper delivery host/IP and attempts to deliver the message to that host.

To configure a smart host, create

PHP Code:

and add the following lines.

Be sure to change to the hostname or ip of the smart host server:

PHP Code:
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = *

Next run

PHP Code:

Then run

PHP Code:

Thats it, watch the logs for a bit to make sure it’s working!