As a default, Sophos / Astaro UTM’s SMTP Proxy listens on all external IP addresses. Quite annoying if you have an internal mail server that you want to let your external users use for sending (authenticated) emails, since UTM will intercept all SMTP traffic.
Here’s how I solved that (only works if you have at least 2 public IP addresses).
– NAT one external public IP address to your internal mail server (so forward at least ports 25, 465, 587; use the IP address that you use for (example) mail.yourdomain.com. In this example I useÂ 184.108.40.206 (WAN – FW2)
– enable SMTP proxy on your UTM (your UTM will now listen on all your external public IP addresses)
– SSH to your UTM and become root
– with vi, edit this file:Â /var/storage/chroot-smtp/etc/exim.conf
– edit this line, remove the # and enter your public IP address to reflect your MX record (like mx.yourdomain.com):
local_interfaces = 220.127.116.11:18.104.22.168:22.214.171.124
(I have 3 SDSL lines on my Sophos UTM box, separate each entry with semicolons)
– restart your EXIM service:
Check you SMTP Proxy log file, something like this should appear:
listening for SMTP on [126.96.36.199]:25 [188.8.131.52]:587 [184.108.40.206]:25 [220.127.116.11]:587 [18.104.22.168]:25 [22.214.171.124:587]
Done. Now, Sophos UTM will intercept your incoming MX traffic (and if setup right, forward non-junk emails to your internal mail server) while the other IP address is useable for your users as an authenticated relay-server.Â 126.96.36.199 is used directly by the mail server,Â 188.8.131.52,Â 184.108.40.206 andÂ 220.127.116.11 by Sophos as incoming MX server.