A smart host is a type of email message transfer agent that allows a Simple Mail Transfer Protocol (SMTP) server to route email to an intermediate mailserver rather than directly to the recipient's server. This smart host often requires authentication from the sender to verify that the sender has privileges to have mail forwarded through the smart host. This is an important distinction from an open mail relay that will forward mail from the sender without authentication. Common authentication techniques include SMTP Authentication and POP before SMTP.
This article explains the details of both server side and client side confugurations for smarthost setup.
Client Side Settings
Login to the smarthost client server
Create /etc/exim.conf.local on the source server and add the following lines. Be sure to replace 'smarthostserver' to the hostname or IP of the smart host server.
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * smarthostserver
Run /scripts/buildeximconf and then /scripts/restartsrv_exim.
Server Side Settings
Login to the smarthost server.
Allow the IP of the mailserver to relay through the smarthost. Open the configuration at /etc/exim/exim.conf, edit the following line and replace X.X.X.X with your mailserver IP.
hostlist relay_from_hosts = 127.0.0.1 : x.x.x.x
Add the mailserver ipaddresses in the following files.