To configure a smart host, create /etc/exim.conf.local on the source server (server1 in this example) and add the following lines. Be sure to change to the hostname or IP of the smart host server.
@ROUTERSTART@
smart_route:
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * host.name.of.smart.host.server
Next run /scripts/buildeximconf and then /scripts/restartsrv_exim. If not, simply restart your Exim server using normal init scripts.
If your relay require auth
begin routes
send_to_smarthost:
debug_print = "R: smarthost for $local_part@$domain"
driver = manualroute
domains = ! +local_domains
transport = remote_smtp_smarthost
route_list = * smtp.remote.host::port_number
host_find_failed = defer
no_more
begin transport
remote_smtp_smarthost:
debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
driver = smtp
hosts_require_auth = smtp.remote.host
begin auth
spamgateway_login:
driver = plaintext
public_name = LOGIN
client_send = : user : password