How can we help?


Adding a smarthost - Divert non local messages to another SMTP

Stewart -


Smarthost Servers


  • atmail mail server


Rerouting required for specific servers


Messages to 'non' local accounts will be routed via the remote_smtp router in the Exim configure file /var/lib/atmail/mailserver/roles/exim/templates/ss1ip/routers.j2. The default rule can be modified to relay all outgoing messages via another SMTP-server ( rather then the localhost ) . This is handy for relaying messages to a remote SMTP server for processing, for example a dedicated Antivirus or Anti-Spam appliance/server.

To enable edit the Exim routers configure ansible file and add: 

driver = manualroute
domains = ! +local_domains
transport = remote_mail
route_list = *
ignore_target_hosts = :

Where is the name of your external smtp server. The IP address of the Atmail server must have relay-access via the external SMTP server to send outgoing messages.

Save changes and publish config.

When making changes to the ansible templates, save your changes then go to your webadmin > services tab and hit publish config, for the changes made to become active.

Afterwards, restart Exim. 

systemctl restart exim
Have more questions? Submit a request


Contact our support team

+61 (7) 5357 6605