Configure Exim to relay outgoing mail through the gateway as a smart host, using a
manualroute router with authenticated SMTP transport.
- Add a router (typically in
/etc/exim4/conf.d/router/or your distribution's equivalent) that sends outgoing mail to the gateway's inbound server as a smart host:
send_via_gateway:
driver = manualroute
domains = ! +local_domains
transport = gateway_smtp
route_list = "* smtp.adlerwacht.com::587"
- Add a matching authenticated transport:
gateway_smtp:
driver = smtp
hosts_require_auth = smtp.adlerwacht.com
hosts_require_tls = smtp.adlerwacht.com
- Add your gateway account's credentials to Exim's authenticator configuration
(typically
passwd.clientor your distribution's equivalent):
smtp.adlerwacht.com:you@yourcompany.com:your-mailbox-password
- Validate the configuration and restart Exim:
exim -bV
systemctl restart exim4
- Send a test message from the server to confirm it now routes through the gateway.
Exact file locations and router/transport naming vary between distributions
(Debian's exim4 split-config layout differs from a single monolithic
exim.conf) — the router/transport shape above is the part that stays
the same regardless of where it lives on your system.