Sophos UTM: Configuring Email Protection for Exchange

Here is a short article on the configuration of Sophos UTM Email Protection in conjunction with an internal Exchange 2013 / 2016 server. I use these settings privately, most SPAM is reliably filtered, viruses have not gotten through so far. The question about the configuration of Email Protection came from the article "Conversion from POP retrieval to MX record", so I will briefly describe the configuration here.

In order for the UTM to recognize valid and existing email addresses and directly reject emails to invalid recipients, the UTM must know all of the organization's email addresses. Since Exchange 2013, this is only possible reliably by querying the Active Directory. SMTP CallOut procedure (in Sophos language "server request"), will always deliver a positive result in connection with Exchange from version 2013. The background is that Exchange first checks the recipients in the backend, but the UTM makes the request against the front end and no verification of the recipient takes place at this point.

For the recipient check via Active Directory, AD must first be added as an authentication service:

Sophos UTM: Configuring Email Protection for Exchange

A domain controller is specified as the server (or several domain controllers as a host group). Unfortunately, SSL has not worked reliably in conjunction with email protection for several UTM versions. The DistinguishedName of the AD domain is specified as the Base DN:

Sophos UTM: Configuring Email Protection for Exchange

Email protection can now be activated:

Sophos UTM: Configuring Email Protection for Exchange

The email domains to which the UTM should respond are now specified under the "Routing" tab. These must match the accepted domains of the Exchange server. The mails can be delivered to the Exchange servers using a static host list. The AD can now be used for recipient authentication:

Sophos UTM: Configuring Email Protection for Exchange

I have configured the other settings in my environment, some of them are already configured by default, so here are just a few screenshots of the configuration:

Sophos UTM: Configuring Email Protection for Exchange

Sophos UTM: Configuring Email Protection for Exchange

Sophos UTM: Configuring Email Protection for Exchange

You need to experiment a little with the privacy settings. For example, I have blocked the sending of account information. However, some rules are too strict and also block valid emails:

Sophos UTM: Configuring Email Protection for Exchange

So that Exchange can also be used via the UTM, I have allowed the host-based relay for the Exchange server. The "Authenticated Relay" option would also work here:

Sophos UTM: Configuring Email Protection for Exchange

For the mail transport to work in encrypted form, the UTM must have a valid certificate and the TLS version can also be set. It currently works quite well for me with "TLS 1.1 or higher". Only TLS 1.2 has led to many connections being unencrypted again (fallback to plain SMTP), so I'd rather have a bit of encryption than none at all:

Sophos UTM: Configuring Email Protection for Exchange

DKIM is also advisable; I have already described the configuration here:

Sophos UTM: Configuring Email Protection for Exchange

Finally, the quarantine break can also be activated. Users then receive a summary of all mails that have ended up in the quarantine and can release them if necessary:

Sophos UTM: Configuring Email Protection for Exchange

However, I have restricted the source networks here so that mails can only be shared from internal networks. Which release options are activated depends on the requirements. I would initially only activate "Spam" here:

Sophos UTM: Configuring Email Protection for Exchange

Exchange can be configured with a corresponding send connector so that all mails are routed centrally via the UTM:

Sophos UTM: Configuring Email Protection for Exchange

Sophos UTM: Configuring Email Protection for Exchange

14 thoughts on “Sophos UTM: Konfiguration der Email Protection für Exchange”

  1. Hallo Frank,
    eine Frage am Rande.
    Wir nutzen eine Sophos UTM mit diversen White- & Blacklist und Sandstorm.
    Auch die Quarantäne-Meldungen gehen zweimal pro Tag an die User, die jedoch selber diese nicht freigegeben können – nur der Admin.
    Nun zu meiner Frage:
    Kann ich jeder externe Mail einen Header via Sophos einfügen? Inhalt: „Externe Mail, seien Sie vorsichtig mit Links und Anhängen!“

    Danke für Dein Feedback.
    Viele Grüße
    Flo

    Reply
  2. Hallo Frank,

    Vielen Dank für deine tollen Beiträge die schon vielen Leuten geholfen haben. Alles gut Schritt für Schritt erklärt, Klasse!

    Hast du schon Erfahrungen gesammelt, was Office365 (Exchange Online) und E-Mail Protection auf der SG/XG angeht?
    In dem Szenario allerdings einen reinen Exchange-Online und keine hybrid-Bereitstellung.

    Wäre schön wenn du Zeit findest dazu vielleicht etwas zu veröffentlichen :-)

    Reply
  3. Hat sich ebenfalls erledigt.
    Hatte noch eine DNat Regel für SMTP aktiv.
    Jetzt läuft alles, danke für die tollen Howtos :)

    Gruß
    Eric

    Reply
  4. Hi Frank,

    habe die Anleitung durchgearbeitet.
    Meine Mails werden von Strato per MX Eintrag zugestellt.
    Senden und Empfangen funktioniert auch einwandfrei.
    Im SMTP Live Log sehe ich auf der Sophos aber nur ausgehende Mails und keine eingehenden.
    Werden jetzt nur die ausgehenden Mails gescannt?
    Und falls ja, was muss ich tun damit auch die eingehenden Mails gescannt werden?

    Gruß
    Eric

    Reply
  5. Wie sind eure Erfahrungen mit gesperrten AD-Konten durch zu viele fehlerhafte Login-Versuche und was tut ihr dagegen?

    Reply
  6. Die Anleitung ist gut, vielen Dank! Ich lasse BATV allerdings immer aus; damit gibt es ab und zu Probleme mit Abwesenheitsmeldungen von Exchange. Außerdem verwende ich immer den zweifach Scan und Sandstorm. Das ist allerdings eine Frage der Performance der UTM und ob der Kunde das nötige Kleingeld hat.

    Reply
  7. Hallo,
    ich habe schon ein offizielles Zertifikat exchange.domain.com auf meinem Exchange laufen.
    Könnte ich das auch gleichzeitig für die Verschlüsselung des Mailtransports auf der Sophos nutzen?
    Oder doch lieber ein eigenes Zertifikat (z.B. sophos.domain.com) dafür?

    Danke!

    Reply
  8. Moin,
    auch bei Exchange 2013/2016 ist die bessere Lösung die Variante mit dem Server Callout. Dazu muss ein separater Empfangsconnector auf einem anderen Port bsp 5252 genutzt werden. Auf der UTM dann entsprechend ein NAT bauen.

    Reply
  9. Hey Frank,

    ich hab grad die Sophos aus der VM rausgenommen und auf einem Mini-PC installiert und war gerade am Konfigurieren von SMTP, als Deine Nachricht mit dieser Anleitung kam. Prompt ausprobiert – klappt hervorragend!

    Vielen Dank!

    Reply
  10. Prima Artikel, vielen Dank. Allerdings würde ich als Bind-DN user@domain.tld verwendet, das funktioniert nach meiner Erfahrung zuverlässiger und funktioniert auch noch, wenn jemand auf die Idee kommt den User in eine andere OU zu verschieben.
    Gruß aus dem Norden
    Thomas

    Reply

Leave a Comment