- 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:
divertnonlocal: driver = manualroute domains = ! +local_domains transport = remote_mail route_list = * smtp.domain.com ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 no_more
Where smtp.domain.com 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