The setup of the small Exchange 2016 organization for small businesses and test environments is now quite advanced. The fourth part of this article series is about the Sophos UTM. The network configuration is as follows:
The Fritzbox establishes the Internet connection, the WAN port of the UTM (VM) is connected to a LAN port of the Fritzbox. A switch to which the servers are connected is in turn connected to the LAN port of the UTM. At network and VM level, this can be solved wonderfully via VLANs, or by using a corresponding number of network cards.
I have installed the UTM as a VM, 2 CPUs, 4 GB RAM and an HDD with 60 GB are completely sufficient here.
Installation
As I mentioned, I have already installed the Sophos UTM, for the sake of completeness, here are a few screenshots of the installation and configuration that has already been done:
Internal network: 172.16.100.254/24
Interestingly, the Setup Wizard no longer found the second network card for the external network. The interface was still displayed during the installation. I therefore simply skipped this step and made up for the configuration. Here are the corresponding settings of the Setup Wizard from my test environment:
As mentioned above, the setup wizard did not find the second network card, but eth1 was displayed correctly after logging in, so I configured it as an external interface:
Now both network cards are configured accordingly. eth1 is connected to the Fritzbox, eth0 in the same network as the DC and Exchange Server:
Since I had set up the Internet connection manually, I also have to create a masquerading rule:
The next step is to send e-mails.
E-mail dispatch
The Exchange Send Connector has already been described in Part 3 created. Using the send connector, Exchange forwards mails to external recipients to the UTM. The UTM should now transfer the mails to the Strato mail server, so Strato is also used as a smart host, as otherwise problems with AntiSpam gateways occur in connection with a dynamic IP.
In order to use Strato as a smarthost, a mailbox is required, the Catch-All mailbox is suitable here. The Catch-All mailbox must still be created at Strato, this is done via the Strato Customer Center:
Important: Haken bei „Postfach empfängt alle E-Mails an undefinierte Adressen…“ setzen. Passwort und E-Mail Adresse merken.
That's all, let's continue with the UTM.
To enable sending, the e-mail protection of the UTM must be activated:
Unter dem Reiter Relaying wird nun der Exchange Server in der Kategorie „Host-based Relay“ eingetragen:
It should now look like this:
Exchange darf nun E-Mails via Sophos UTM relayen, es fehlt nur noch die Konfiguration von Strato als Smarthost. Unter dem Reiter „Advanced“ findet sich ganz unten der Punkt „Smarthost Settings“:
The SMTP server from Strato is now entered here:
Since Strato requires login information, the e-mail address and password of the catch-all mailbox are also entered:
Sending mails is finished, now you can continue with receiving mails.
E-mail reception
The subject of reception is a little more complicated, at least if you do it the way I do. Hence a short explanation.
Die UTM bringt einen recht ausgewachsenen SPAM Filter mit, der für kleine Umgebungen und Testumgebung super ist. Für den Versand nutzen wir bereits das Feature, genannt E-Mail Protection. Für den Empfang können wir mit einem Trick auch den Spamfilter nutzen. Aufgrund der dynamischen IP haben wir keine andere Möglichkeit, als die Mails via POP3 von Strato aus dem Catch-All Postfach abzuholen, natürlich ist der Abruf der Mails via POP3 am SMTP Spamfilter „vorbei“, da hier ein anderes Protokoll benutzt wird, eben POP3 anstatt SMTP.
Zwar bietet die UTM auch einen POP3 Proxy, allerdings finde ich den POP3 Proxy nicht sonderlich gut umgesetzt. Zum Beispiel werden 2 getrennte Quarantänen erstellt, eine für SMTP, eine für POP3. Auch eine Quarantäne Mail Benachrichtigung lässt sich nicht aktivieren. Es gibt also 2 Möglichkeiten: Entweder POP3 Connector auf dem Exchange Server installieren und Mails direkt an den Exchange Server per SMTP weiterleiten, oder POP3 Connector irgendwo installieren (kann eine kleine VM sein, oder auch der Exchange Server selbst) und die Mails wieder an die UTM weiterleiten. Die UTM leitet nach ihren SPAM Checks (jetzt ist das Protokoll SMTP), wieder an den Exchange weiter. Die zweite Variante ist war „von hinten durch die Brust ins Auge“, aber jetzt lässt sich auch der SPAM-Filter der UTM nutzen.
Konfiguration der „Von hinten durch die Brust ins Auge“-Variante
A user is required for the Active Directory so that the UTM can verify the valid recipients, a standard user account is sufficient, only the password should better not expire:
In diesem Fall ist es das Konto „SophosUTM“, benötigen wir jetzt den Distinguished Name, am schnellsten kommen wir per PowerShell an den DN:
Get-ADUser SophosUTM | fl name,DistinguishedName
An der Sophos UTM wird nun unter „Definitions & Users“ ein neuer Authentication Server vom Typ „Active Directory“ angelegt:
Als Server wird der Domain Controller angegeben, als „Bind DN“ wird der Distinguished Name des vorhin erstellten Benutzers mit dem entsprechenden Benutzerpasswort angegeben. Der Test sollte jetzt erfolgreich sein.
Now the domain can be specified in E-Mail Protection and the routing to the Exchange server. Recipient validation takes place via the Active Directory:
Continue with the POP Connector
Setup POP Connector
A POP3 connector is now required. I have had good experiences in the past with POPcon from Servolutions made. POPcon costs 79 EUR, but there are also free POP Connectors such as POP Collector.
Zunächst einmal das Beipiel mit POPCon von Servolutions. Die Installation ist selbsterklärend. Nach der Installation, wird auf „Server konfigurieren“ geklickt und auf dem ersten Reiter eine Postmaster Adresse angegeben:
Auf dem Reiter „POP3/IMAP“ kann das Catch-All Konto konfiguriert werden:
The type should be POP3-SSL / TSL. The Strato POP3 server is called pop3.strato.de. The user name and password correspond to the catch-all mailbox created above.
Auf dem Reiter „Exchange“ wird nun nicht der Exchange Server angegeben, sondern die IP oder der Hostname der UTM, so lässt sich der SPAM-Filter Teil der UTM nutzen:
Wer nicht die „Von hinten durch die Brust ins Auge“-Methode nutzen will, kann hier natürlich auch einfach die IP oder Hostnamen des Exchange Servers eintragen. Zum Schluss noch auf dem Reiter „Zeitplanung“ einen entsprechenden Wert für den Abruf eintragen:
After the POP3 account has been created, the e-mail domain must be entered:
The download of the mails, if available, should now work:
Summary
Sending and receiving mails already works and the connection to Outlook from the internal network also works. However, some work is still required for Outlook Anywhere, Active Sync and OWA to work.