Exchange 2010: Using certificates from Let's Encrypt (Part 1)

Certificates from Let's Encrypt are becoming increasingly popular, which is hardly surprising as the certificates are free and there are simple clients to obtain the certificates. Let's Encrypt certificates are only valid for 3 months, but the available clients take care of renewing the certificates.

Exchange 2016 can even be used with a small PowerShell Script completely automatically. In principle, this can also be done with Exchange 2010, which some have already requested and even modified the script themselves. However, a little preparatory work is required so that no certificate warnings appear later.

I have therefore set up a small demo environment consisting of a domain controller and an Exchange 2010 server to illustrate one of the possible configurations.

The Active Directory has the name frankysweb.local. The users use the e-mail addresses @frankysweb.org. An environment of this type is likely to be found quite frequently, which is why I am also using this environment for this HowTo.

The domain controller is also named dc.frankysweb.local and the Exchange 2010 server is named ex2010.frankysweb.local.

For Exchange 2010, it is best practice to separate internal and external access points. This small environment will therefore use the following access points:

  • outlook.int.frankysweb.org (internal access point)
  • outlook.frankysweb.org (External access point)
  • autodiscover.frankysweb.org (Autodiscover internal and external)

The Exchange Server is connected directly to the Internet via a router:

Exchange 2010 Let's Encrypt certificates

Corresponding port forward rules are set up on the router. Ports 80, 443 and 25 are forwarded directly to the Exchange server. Port 25 is not relevant for this article. Port 80 and 443 are mandatory.

Note: The HowTo consists of two articles, please wait for both articles first. See "Next steps" at the end of the article. The section "Exchange CAS Array" is also important!

DNS

After the test installation, the DNS on my domain controller only recognizes the zone "frankysweb.local", in this zone there is also the Host-A entry of the Exchange server with the name EX2010:

image

I have not yet made any configuration in this test environment, which means that Outlook now establishes a connection to the Exchange Server with the name "EX2010.frankysweb.local". This can also be seen in the Outlook connection overview:

image

As long as the DNS name "EX2010.frankysweb.local" is present on the certificate for Exchange, this is not a problem. Let's Encrypt, as well as all other CAs, do not issue certificates for private TLDs (.local, .intern, etc). You can issue such certificates with your own CA, but this does not work with public CAs, also because in the case of Let's Encrypt the internal name cannot be verified.

The connection must therefore be established via a publicly valid DNS name. To achieve this and at the same time implement the Exchange 2010 best practice "Separate internal and external access points", two new zones are first created on the internal DNS. DNS Split Brain is therefore used here in the classic way.

The "int.frankysweb.org" zone only receives a HOST-A entry with the internal IP of the Exchange server. The DNS name outlook.int.frankysweb.org is then used later for internal access:

image

The "frankysweb.org" zone receives two HOST-A entries with the names "outlook" and "autodiscover". These two entries are later also created at the hoster of the public DNS zone and are used for Outlook Anywhere and Autodiscover:

image

This results in 3 DNS names for the Let's Encrypt certificate:

  • outlook.int.frankysweb.org (internal access point)
  • outlook.frankysweb.org (External access point)
  • autodiscover.frankysweb.org (Autodiscover internal and external)

More on this later.

Exchange CAS array

The Exchange 2010 CAS array is a bit tricky. In the default configuration, no CAS array is configured, which means that all Outlook connections are established to the local FQDN of the Exchange server. This becomes clear in Outlook connection status:

image

With the CAS array it is possible to change the FQDN of the Exchange Server, this is a prerequisite when configuring a highly available Exchange environment, but also to get rid of the local server name of a single Exchange Server.

The common thing about the CAS array is the followingIf there are already Outlook profiles that use the local FQDN and the CAS array is subsequently set up, the Outlook profile does not change. In concrete terms, this means that Outlooks that have already been set up are not referred to the new FQDN of the CAS array, but retain the old FQDN. The only thing that helps here is to recreate the Outlook profile after setting up the CAS array, or to create it with the "RichProfile" to be changed subsequently.

To create a CAS array and change the FQDN for access, the following command is executed on the Exchange Shell:

New-ClientAccessArray -Name CASArray -Fqdn outlook.int.frankysweb.org -Site Default-First-Site-Name

image

The CAS array has now been created and must then be assigned to the mailbox databases:

Set-MailboxDatabase MBDB1 -RpcClientAccessServer outlook.int.frankysweb.org

image

After the existing Outlook profile has been recreated, or the profile has been customized with the tool mentioned above, the connection now runs against "outlook.int.frankysweb.org"

image

The remaining Exchange URLs can now also be customized.

Exchange URLs

The remaining URLs for the respective Exchange services can now also be adapted so that no certificate warnings occur later and Autodiscover works properly.

First, the Autodiscover URL is changed to "autodiscover.frankysweb.org":

Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri https://autodiscover.frankysweb.org/Autodiscover/Autodiscover.xml

image

Outlook Anywhere can then be switched on or, if Outlook Anywhere is already switched on, the host name can be changed to "outlook.frankysweb.org". Only the external host name needs to be specified for Outlook Anywhere, the internal name is the FQDN of the CAS array that has already been configured:

image

The virtual directories are now configured with the corresponding URLs. internal FQDN is outlook.int.frankysweb.org and external FQDN is outlook.frankysweb.org, which then results in the URLs. Here in the example for OWA:

image

The same applies to ECP:

image

And here for ActiveSync:

image

And also for the OAB:

image

There is another directory which cannot be configured directly via the Exchange Console, but only with the Exchange Shell. To change the EWS URL, the following command can be used:

Get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory -InternalUrl https://outlook.int.frankysweb.org/EWS/Exchange.asmx -ExternalUrl https://outlook.frankysweb.org/EWS/Exchange.asmx

image

After all URLs have been adjusted, the IIS is restarted once:

iisreset

image

The Outlook Autodiscover test should now only distribute the appropriately configured URLs for internal and external access points. The internal FQDN "EX2010.frankysweb.local" must no longer appear:

image

Next steps

Without a valid certificate, certificate warnings will now appear. In the second part, the external DNS is adjusted and the Let's Encrypt certificate is configured.

12 thoughts on “Exchange 2010: Zertifikate von Let’s Encrypt nutzen (Teil 1)”

  1. Moin, vielen Dank für den Artikel. Ich habe noch eine Frage zu:

    „Hier hilft nur nach der Einrichtung des CAS-Arrays auch das Outlook Profil neu zu erstellen, oder es mit mit dem Tool “RichProfile” nachträglich zu ändern.“

    RichProfile gibt es so nicht mehr, auch der DL Link in deinem anderen Beitrag ist weg. Dort ist aber in einem Kommentar der DL von einer anderen Seite gelinkt. Laut Virus Total scheint es seit 2012 das selbe Paket zu sein, allerdings schlagen 2/62 Scanner an:
    https://www.virustotal.com/gui/file/17bff9eee3d0b34259e5469b5bc5de1fe09c5b2dfb2a4f0d60722dada87e2129/detection
    Und wenn ich es richtig verstehe brauche ich eine Lizenz – die gibt es aber nicht mehr.

    Frage: Was ist mit „das Outlook Profil neu zu erstellen“ gemeint? Eine ganze Neuerstellung des Postfachs auf dem Server (wie ohne Datenverlust) oder beim Client PC mittels „outlook.exe /profiles“ ? Das Tool scheint ja eher Serverseitig zu arbeiten.
    Gruß

    Reply
  2. Ich möchte mich herzlichst bei Dir bedanken. Die Anleitung hilft auch wunderbar bei der sauberen Migration des Exchange zu Exchange Online, da hier ein valides SSL Zertifikat benötigt wird.
    Es gab jetzt beim SBS 2011 ein paar Probleme mit der Powershell und dem PackageManagement. Da gab es immer wieder Probleme, die aber mit der Hilfe aus den Kommentaren gelöst werden konnten. Auch die Kommentierenden hier ein Dank.

    Reply
  3. Hallo,
    kann man diese Anleitung auch für Exchange Server 2016 verwenden?
    Ich habe hier auf einen Server Windows 2016 und Exchange 2016 installiert und die Domäne heißt: TestDomane.local.

    Danke schon für die Antwort

    Reply
    • Wenn Du eine neue Domäne aufsetzt, dann ist eine .local nicht ideal. Nutze lieber eine Subdomäne, die Du öffentlich erreichbar machen kannst.

      Reply
  4. Hallo Frank, ich hake nochmal nach.
    Ich habe bei einem Kunden ein käufliches Zertifikat im Einsatz und Split DNS. Da habe ich nichts an CAS Array geändert und es funktioniert anscheinend.
    Warum muß ich dann im Falle von Letsencrypt das CAS Array manipulieren?
    Oder übersehe ich etwas?
    Wie gesagt es sind viele Clients und ich möchte mir das handeln an den Outlookprofilen ersparen.
    Danke.

    Reply
  5. Hallo!

    Ich arbeite mit Server 2008r2 und Exchange 2010 SP3.

    Ist das Anpassen/Ändern des CAS-Array unbedingt notwendig?

    Ich arbeite mit SplitDNS die URLs sind intern und extern gleich.

    Autodiscover funktioniert.

    Ich möchte vermeiden die ganzen Outlook Profile/Verbindungen anzupassen.

    Ansonsten mal wieder ein Top howto!!!

    Danke!

    Reply
  6. Hallo,

    wäre es nicht möglich in deinen Beispiel auch statt der Zone frankysweb.org mit den beiden Host-A Einträgen 2 Zonen anzulegen, einmal autodiscover.frankysweb.org und einmal outlook.frankysweb.org mit einen * Host Eintrag?
    Sonst müssten ja alle externen Dienste, Webserver etc in der DNS Zone mitgeführt werden damit Sie weiterhin erreichbar sind, korrekt?

    Reply
  7. Kurzes Update,

    Ich habe es einfach gewagt und es klappte bestens.
    Einfach eine Top Seite mehr kann man nicht sagen.

    Reply
  8. Hallo Franky

    Ich lese hier schon länger mit und hätte eine kurze Frage, geht aber um einen DC 2016 und einen EX 2016
    Wir setzten hier im Moment noch eigenen Zertifikate ein mit einer CA auf dem DC.
    OWA und ActiveSync gehen wenn ich das Zertifikat auf den Clients installieren.
    Jetzt die Frage, muss ich was beachten wenn ich auf Let’s Crypt wechseln will mit deinem Script, oder muss ich es einfach nur ausführen und er macht alles von alleine?

    Und hier muss gleich die ganze Seite mal loben, hat mir schon viel geholfen und ist sehr sehr informativ. Einfach TOP!!

    Reply

Leave a Comment