PROBLEM
Smarthost Servers
ENVIRONMENT
- atmail mail server
CAUSE
Rerouting required for specific servers
RESOLUTION
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 edit as follows:
Locate:
remote_mail: driver = dnslookup transport = smtp ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 headers_remove = {{ exim_h_spam_report }} verify = false no_more
Change to:
remote_mail: driver = manualroute domains = ! +local_domains transport = smtp 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
Comments