How Exchange Uses SSL Certificates (2024)

Exchange Server uses certificates for:

  • Authentication – to verify that a server truly is the server that it claims to be.
  • Encryption – to prevent theft of or tampering with data in transit by creating a secure connection between servers.

To accomplish these goals, Exchange Server uses several different certificates. In this article, I explain the different types of certificates, their uses, and how to manage them.

SSL Versus TLS

SSL, which stands for Secure Sockets Layer, is an encryption method between a server and a client developed in the early nineties by Netscape. The never-released SSL version 1.0 was followed in 1995 by SSL version 2. This version had some weaknesses and was quickly replaced by SSL version 3.0 in 1996.

The successor of SSL is TLS, which stands for Transport Layer Security. TLS version 1 was introduced in 1999 and is not interoperable with SSL, but TLS 1.0 contains a fallback mechanism to use SSL version 3.0.

Released in 2006, TLS 1.1 was an improved version. It was quickly followed in 2008 by TLS 1.2. Although TLS 1.3 appeared in 2018, TLS 1.2 is still very much in active use. Exchange 2019 uses TLS 1.2 by default and does not yet support TLS 1.3. On the other hand, Windows 2022 supports TLS 1.3. Table 1 gives an overview of each TLS version and its publication and deprecation year.

ProtocolPublishedStatus
SSL 1.0Never publishedNever published
SSL 2.01995Deprecated in 2011
SSL 3.01996Deprecated in 2015
TLS 1.01999Deprecated in 2021
TLS 1.12006Deprecated in 2021
TLS 1.22008In use since 2008
TLS 1.32018In use since 2018

How Exchange Uses SSL Certificates (1)

Certificate Usage

Servers use certificates for authentication and encryption. When a client wants to set up a secure connection to a server, the server presents a certificate. Similar to the checks performed at an airport to validate a passport, the FQDN that the client uses must match the certificate, the certificate must not be expired or revoked, and the issuer of the certificate must be trusted.

If all checks pass, the client uses the information found in the certificate to create a secure connection. If not, what happens depends on the circ*mstances. When using a browser client like OWA, the client displays a warning message, and you can choose to continue to set up an encrypted connection or close the browser. If a problem occurs with an SMTP connection, the client can continue with a secure connection, but the server is not authenticated. Attempting to proceed with an unauthenticated server may present a problem when using domain security or forced TLS, where all checks must pass. If not, the client cannot create a connection, and messages cannot be sent.

Only the connection is encrypted. The data is still sent unencrypted over the encrypted connection. With eavesdropping, a malicious user can sniff the network traffic, but not read the actual data. When a malicious user is capable of terminating the connection, he can see the actual contents. This is known as a ‘man in the middle’ attack. To prevent this, an end-to-end encryption method can be used like S/MIME where the sending Outlook client encrypts the data, and the receiving Outlook client decrypts the data.

A certificate contains a private key and a public key. The public key is used to encrypt data, the private key is used to decrypt the data. The public key is always available, the private key is only available on the server that holds the certificate.

To decrypt traffic from a server, the client must obtain the certificate from the server. The certificate is exchanged using the TLS handshake. This is visible in the SMTP protocol logs as shown in Figure 1.

How Exchange Uses SSL Certificates (2)

In an Exchange hybrid configuration, the certificate on the Exchange server must be a valid 3rd party certificate. These certificates are issued by a trusted vendor, and all clients and servers will automatically trust these vendors and the certificates they issue. If it is not a valid 3rd party certificate, mail flow will not work. To work around this, you can opt for verifying the IP address in the Exchange Admin Center instead of the certificate when configuring the Connector.

Exchange and Certificates

When an Exchange server is installed, it comes with three preconfigured certificates. You can see these certificates using the Get-ExchangeCertificate cmdlet. Here’s an example of retrieving Exchange certificate information:

Get-ExchangeCertificate -server EXCH01Thumbprint Services Subject---------- -------- -------A9CF3E1D0DCA5DDA87 ....S.. CN=Microsoft Exchange Server Auth Certificate2259CF7ADEB6D7CDFE IP.WS.. CN=EXCH01637647FAB458DB7507 ....... CN=WMSvc-SHA2-EXCH01

Note. The thumbprints have been edited for better readability.

The first certificate is an authentication certificate used for OAuth authentication in a hybrid environment. This certificate is installed on all Exchange servers in the organization, as well as on Exchange 2016 or Exchange 2013 servers when present in the organization.

To make this certificate available to all Exchange servers in an organization, it is stored in the configuration partition of Active Directory (Figure 2).

How Exchange Uses SSL Certificates (3)

The second certificate is the Exchange server self-signed server certificate. This certificate is generated during installation of the server, and it has a Common Name (CN) with the NetBIOS name of the server. In this example it is CN=EXCH01. A second Exchange server in the organization has a Common Name CN=EXCH02 etc.

The self-signed certificate is used to create encrypted TLS connections between Exchange servers in the same organization. Since the servers are members of the same Active Directory, they automatically trust each other. There’s no need for these servers to use certificates to validate connections.

The self-signed certificate can also be used to set up encrypted TLS connections with external SMTP hosts. The certificate is then used for encryption only since the external host cannot validate the self-signed certificate. Connections of this type are called ‘opportunistic TLS’.

The self-signed certificate can be used for connections with clients like Outlook on the Web or Outlook, but since this certificate does not contain the name of the server and it is not trusted by the client its use generates an error message (Figure 3).

How Exchange Uses SSL Certificates (4)

The error message shows the FQDN that the client wants to access (in this example webmail.p365labs.com) and the actual error provoked by the connection. Obviously, the certificate is not trusted and the name on the certificate does not match the name of the site. This makes sense since the name on the certificate is CN=EXCH01.

The third certificate with the Common Name CN=WMSvc-SHA2-EXCH01 is not an Exchange certificate. This is an IIS self-signed certificate created when the webserver role is installed on the server.

Getting and Using Third-Party Certificates

In a normal Exchange environment, you must install a thirdparty certificate. These certificates are trusted by almost all clients. Or better, the certificate authority that issues these certificates is trusted by all clients, and therefore their issued certificates are trusted.

There are several vendors selling these certificates, but I always use certificates from Digicert because I know they work. For an overview of Microsoft certificate requirements, please check the Certificate requirements for hybrid deployments article on the Microsoft website.

Creating a new third-party certificate consists of the following steps:

  1. Creating a certificate request.
  2. Requesting a certificate from a certificate authority and validating ownership of the domain.
  3. Downloading the answer file and completing the request.
  4. As a bonus, exporting the certificate for backup purposes.

In previous versions of Exchange Server, it was possible to request certificates using the Exchange Admin Center, but with Exchange 2019 it is only possible to do this using PowerShell. Here’s an example of requesting a new certificate with PowerShell:

$RequestData = New-ExchangeCertificate -GenerateRequest -Server EXCH01 -SubjectName "c=NL, S=Noord-Holland, L=Amsterdam, O=Contoso, OU=RND, CN=webmail.p365labs.com" -DomainName webmail.p365labs.com,Autodiscover.p365labs.com -PrivateKeyExportable $trueSet-Content -path C:\Install\SSL-Request.req -value $RequestData

These commands create a text file containing the certificate request. Upload the contents of the file to the portal of your vendor, validate the ownership of the domain, and when it was issued, download the answer file to your server.

Use the following PowerShell commands to import the answer file (on the same server you used to create the request file!):

$Data = [Byte[]]$(Get-Content -Path "c:\install\webmail_p365labs_com.p7b" -Encoding byte -ReadCount 0)Import-ExchangeCertificate -Server EXCH01 -FileData $Data

These commands import the certificate on the target Exchange server. At this point, the certificate is available on the server, but it doesn’t do anything. To enable this certificate for the IIS and SMTP service, use the following PowerShell commands. The value of the thumbprint is shown on the console when importing the certificate in the previous step.

Get-ExchangeCertificate -Server EXCH01 -Thumbprint 603130010099995AD42FBD54856820B9C9AC6BB0 | Enable-ExchangeCertificate -Server EXCH01 -Services IIS,SMTP

When executing this command, a warning message is shown asking if the default self-signed certificate should be overwritten by the new certificate.

Overwrite the existing default SMTP certificate?Current certificate: '2259CF7ADEB6D7CDFEED739355BE7B32EBBB75FD' (expires 10/4/2028 12:15:41 PM)Replace it with certificate: '603130010099995AD42FBD54856820B9C9AC6BB0' (expires 10/4/2024 1:59:59 AM)[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"):

I always select ‘No’ since I want the Exchange servers to use this certificate for server-to-server communication. This certificate is also used for authentication with an Edge Transport server, so that’s another reason to keep the default certificate.

You can use the following PowerShell command to export the new certificate to a backup file. The commands take the certificate, ask for a password to set on the backup file and then write the certificate to the backup file.

$Cert = Export-ExchangeCertificate -Thumbprint 603130010099995AD42FBD54856820B9C9AC6BB0 -BinaryEncoded -Password (Get-Credential).password[System.IO.File]::WriteAllBytes('C:\Install\webmail_p365labs_com.pfx', $Cert.FileData)

When multiple Exchange servers exist in an organization, you must also import the Exchange certificate in the other Exchange servers. The Import-ExchangeCertificate cmdlet changed in Exchange 2019 CU12. In earlier versions, it was possible to use the -FileName parameter which accepts UNC filenames. UNC filenames are not secure when importing data, so Microsoft removed the -FileName parameter from the cmdlet. Starting with Exchange 2019 CU12, you must use the -FileData parameter. Here’s an example of importing a .PFX file into an Exchange server.

Import-ExchangeCertificate -Server EXCH02 -FileData ([System.IO.File]::ReadAllBytes('C:\Install\webmail_p365labs_com.pfx')) -Password (Get-Credential).passwordGet-ExchangeCertificate -Server EXCH02 -Thumbprint 603130010099995AD42FBD54856820B9C9AC6BB0 | Enable-ExchangeCertificate -Server EXCH02 -Services IIS,SMTP

This step is not really needed, but after installing a certificate, I always recycle the Internet Information Server components using the IISRESET command, and I restart the Microsoft Exchange Transport and Microsoft Exchange Frontend Transport services.

How Exchange Uses SSL Certificates (5)

Edge Transport Server Certificates

The Edge Transport server role also comes with a self-signed certificate. This certificate is used for authentication purposes between the Edge Transport server and Exchange mailbox servers in the organization. It is also used for TLS connections between the Edge Transport server and other mail servers, including the internal Exchange servers.

The process of requesting certificates on the Edge Transport server is identical to the process on the internal mailbox servers.

After you create and configure the certificate on the Edge Transport server, you can use the checkTLS tool (https://checktls.com) to check your Edge Transport server. After installing a third-party certificate on the Edge Transport server, you must see good results with CheckTLS. In the following example, MTA-STS and DANE are not configured for this server, but the other tests are good (Figure 4)

How Exchange Uses SSL Certificates (6)

Renewing Certificates

Third-party certificates typically have a lifespan of one year. When this period has almost expired you must request a new certificate. Your certificate authority will automatically send you a notification, typically three months in advance. You can use the commands described above to renew a certificate. Once the new certificate is installed and configured, you can remove the previous certificate, but it does no harm to leave the expired certificate on the server.

Connecting to Exchange Online

A point often forgotten in a hybrid environment, but discovered the hard way when cross-premises mail flow halts, is that the certificates must also be configured on the Send Connector to Exchange Online and the default Receive Connector.

When the certificate is renewed, update the Send Connector from your Exchange server to Exchange Online. Here’s an example of updating a Send Connector with PowerShell:

$TLSCert = Get-ExchangeCertificate -Thumbprint 603130010099995AD42FBD54856820B9C9AC6BB0$TLSCertName = "<I>$($TLSCert.Issuer)<S>$($TLSCert.Subject)"Set-SendConnector "Outbound to Office 365 - <Identifier>" -TlsCertificateName $TLSCertName

Use the following example to update the default Receive Connector on the Exchange servers that accept mail from Exchange Online with the new certificate:

Set-ReceiveConnector "EXCH01\Default Frontend EXCH01" -TlsCertificateName $TLSCertName

The self-signed certificate and the Exchange Auth certificate have a lifespan of five years, so these certificates usually have a longer lifespan than an average Exchange server.

The OAuth Certificate

The OAuth configuration and its accompanying certificate are used to enable server-to-server authentication using the Open Authorization (OAuth) protocol. This protocol is not only used for Exchange servers, but also for Exchange Online, SharePoint Online, Skype for Business, and Teams integration.

When the first Exchange hybrid configuration is created, an OAuth configuration and an OAuth certificate are created. As mentioned in the previous section, the OAuth certificate has a lifespan of five years. This is longer than the normal lifespan of an Exchange server, but not of an Exchange hybrid configuration.

Suppose you created an Exchange hybrid configuration somewhere in July 2019, your OAuth certificate will expire in July 2024. At the time of writing this is only five months away. When the OAuth certificate is about to expire, you will see warning messages pop up in the Exchange Online Admin Center.

The OAuth certificate can be renewed manually as documented in this Microsoft article. Microsoft has also released a script called ‘MonitorExchangeAuthCertificate’ which you can download on GitHub. The script is much easier and admin-friendly than the manual procedure, and it can help when the OAuth certificate is already expired (which is no fun to deal with using the manual procedures). Using the script is my recommendation when renewing the OAuth certificate.

Summary

Exchange server uses certificates for server authentication and encryption purposes. This is for browsers using HTTP(S) and for servers using SMTP. Certificates must be valid, must contain the correct names, must not be expired or revoked, and preferably issued by a trusted third-party certificate authority.

In Exchange 2019, creating, installing, configuring, and renewing certificates is done using PowerShell as it is no longer possible to do this in the Exchange Admin Center. When renewing certificates, there is a gotcha in the hybrid configuration. This is often forgotten, which results in a halted mail flow between Exchange 2019 and Exchange Online.

How Exchange Uses SSL Certificates (2024)

FAQs

How Exchange Uses SSL Certificates? ›

Exchange Server uses certificates for: Authentication – to verify that a server truly is the server that it claims to be. Encryption – to prevent theft of or tampering with data in transit by creating a secure connection between servers.

Which SSL certificate for exchange? ›

But if you're looking for an Exchange SSL certificate, you won't encounter this problem because there's only one type of SSL certificate that's tailor-made for exchange server environments: Subject Alternative Name (SAN) or Unified Communication Certificate (UCC).

Does Exchange Online use SSL? ›

Your external-facing Exchange hybrid server or servers require a third-party SSL certificate for secure connectivity with the Exchange Online service. You need to get this certificate from your third-party SSL provider.

How to import an SSL certificate in Exchange? ›

3: Primary Certificate Installation
  1. Log in to the Exchange admin center.
  2. Go to Servers and click on Certificates.
  3. Choose your SSL Certificate; it will have a Pending request status.
  4. Click Complete.
  5. Enter your SSL Certificate's network path & Click OK.
  6. Get back to the Certificate and click Edit.
Mar 3, 2023

How are SSL certificates used? ›

A website needs an SSL certificate in order to keep user data secure, verify ownership of the website, prevent attackers from creating a fake version of the site, and gain user trust. Encryption: SSL/TLS encryption is possible because of the public-private key pairing that SSL certificates facilitate.

Why do I need an SSL certificate for exchange? ›

Exchange Server uses certificates for: Authentication – to verify that a server truly is the server that it claims to be. Encryption – to prevent theft of or tampering with data in transit by creating a secure connection between servers.

What are the 3 types of SSL certificates? ›

SSL certificates come in three main types: Domain Validated (DV), Organization Validated (OV), and Extended Validation (EV). These digital sentinels are the unsung heroes of website security, working tirelessly behind the scenes to keep your data safe from prying eyes.

Where are exchange certificates stored? ›

The cert is usually located in the Personal > Certificates folder. But pleaseeee do not make changes via this, always use the Exchange Management Shell, you will cause more headache then you want otherwise. If you can't find the cert, then it hasn't been installed properly.

Does Office 365 use SSL or TLS? ›

To maintain a secure connection to Office 365 and Microsoft 365 services, all client-server and browser-server combinations use TLS 1.2 and modern cipher suites.

What encryption does Microsoft Exchange use? ›

For Exchange Online, we use TLS to encrypt the connections between our Exchange servers and the connections between our Exchange servers and other servers such as your on-premises Exchange servers or your recipients' mail servers.

How do I update my SSL certificate on Exchange Online? ›

Open the EAC and navigate to Servers > Certificates. In the Select server list, select the Exchange server that holds the certificate that you want to renew. All valid certificates have a Renew link in the details pane that's visible when you select the certificate from the list.

How do I connect to Exchange Online with certificate? ›

Connect to Exchange Online with Certificate
  1. Create and Export a Self-Signed Certificate. ...
  2. Register the Application in Microsoft Entra ID.
  3. Upload the Certificate to the Registered Application.
  4. Assign API Permission to the Application.
  5. Add Role Assignment to the Application.
  6. Connect to Exchange Online using a Certificate.
Jun 25, 2024

How do I select SSL to connect to the Microsoft Exchange server? ›

On the Tools menu, select Accounts. In the left pane of the Accounts dialog box, select the account. Choose Advanced, and then select the Server tab. Under Microsoft Exchange and Directory service, select the Use SSL to connect check boxes.

When should I use an SSL certificate? ›

Companies and organizations need to add SSL certificates to their websites to secure online transactions and keep customer information private and secure. In short: SSL keeps internet connections secure and prevents criminals from reading or modifying information transferred between two systems.

How does SSL work step by step? ›

How an SSL connection is established
  1. The client sends a request to the server for a secure session. ...
  2. The client receives the server's X. ...
  3. The client authenticates the server, using a list of known certificate authorities.
  4. The client generates a random symmetric key and encrypts it using server's public key.

Why do we need SSL certificate? ›

SSL is a type of encryption protocol that secures data between browsers and servers so it can't be intercepted. This makes it impossible for hackers to read customer information. Ultimately, SSL certificates create a safer website experience for businesses and customers.

What SSL certificate to choose? ›

There are three types of SSL to consider according to the number of domains:
  • A single-domain SSL is ideal for most websites. ...
  • Multi-domain certificates secure multiple domains. ...
  • A wildcard certificate secures a single domain and an unlimited number of subdomains.
Jun 30, 2023

Which SSL version should I use? ›

Simply put, it's up to you. Most browsers will allow the use of any SSL or TLS protocol. However, credit unions and banks should use TLS 1.1 or 1.2 to ensure a protected connection. The later versions of TLS will protect encrypted codes against attacks, and keep your confidential information safe.

How do I know which SSL certificate is used? ›

To check an SSL certificate on any website, all you need to do is follow two simple steps.
  1. First, check if the URL of the website begins with HTTPS, where S indicates it has an SSL certificate.
  2. Second, click on the padlock icon on the address bar to check all the detailed information related to the certificate.

Top Articles
What Is Internet Security? | Fortinet
Access to Care: Remembering Old Lessons
Section 4Rs Dodger Stadium
Kevin Cox Picks
Metallica - Blackened Lyrics Meaning
Craigslist Cars Augusta Ga
Western Union Mexico Rate
Affidea ExpressCare - Affidea Ireland
South Park Season 26 Kisscartoon
Apnetv.con
Mivf Mdcalc
Bustle Daily Horoscope
Little Rock Arkansas Craigslist
Inside California's brutal underground market for puppies: Neglected dogs, deceived owners, big profits
W303 Tarkov
Leeks — A Dirty Little Secret (Ingredient)
Nba Rotogrinders Starting Lineups
G Switch Unblocked Tyrone
The Menu Showtimes Near Regal Edwards Ontario Mountain Village
Costco Great Oaks Gas Price
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
[Cheryll Glotfelty, Harold Fromm] The Ecocriticism(z-lib.org)
Veracross Login Bishop Lynch
Laveen Modern Dentistry And Orthodontics Laveen Village Az
1973 Coupe Comparo: HQ GTS 350 + XA Falcon GT + VH Charger E55 + Leyland Force 7V
Gina Wilson Angle Addition Postulate
Jeff Nippard Push Pull Program Pdf
Does Hunter Schafer Have A Dick
Il Speedtest Rcn Net
Craigslist Pasco Kennewick Richland Washington
Scott Surratt Salary
Grave Digger Wynncraft
Black Lion Backpack And Glider Voucher
2021 Tesla Model 3 Standard Range Pl electric for sale - Portland, OR - craigslist
Martins Point Patient Portal
Kamzz Llc
60 Second Burger Run Unblocked
Mumu Player Pokemon Go
Royal Caribbean Luggage Tags Pending
Craigslist Ludington Michigan
Royals op zondag - "Een advertentie voor Center Parcs" of wat moeten we denken van de laatste video van prinses Kate?
Movies123.Pick
October 31St Weather
Directions To 401 East Chestnut Street Louisville Kentucky
Tokyo Spa Memphis Reviews
Stafford Rotoworld
Tillman Funeral Home Tallahassee
Uc Davis Tech Management Minor
20 Mr. Miyagi Inspirational Quotes For Wisdom
Mega Millions Lottery - Winning Numbers & Results
Oak Hill, Blue Owl Lead Record Finastra Private Credit Loan
Phunextra
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 5878

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.