Home / Acmefyer / Exchange certificate
Renew and install the Exchange certificate automatically.
Outlook, OWA, ActiveSync and Autodiscover depend on the Exchange server’s certificate, and every replacement is manual work in the Exchange Management Shell. Acmefyer obtains the certificate via ACME, for example for free from Let’s Encrypt, and an agent on the Exchange server installs it itself. For Exchange Server SE and 2019.
How to renew the Exchange certificate by hand.
A new certificate as a PFX file gets into Exchange in four steps, in the Exchange Management Shell on every Exchange server:
# 1. Import the certificate
Import-ExchangeCertificate -FileData ([System.IO.File]::ReadAllBytes('C:\certs\mail.pfx')) -Password (Read-Host -AsSecureString)
# 2. Enable it for IIS, IMAP and POP
Enable-ExchangeCertificate -Thumbprint <thumbprint> -Services IIS,IMAP,POP
# 3. Point IMAP and POP to the name in the certificate
Set-ImapSettings -X509CertificateName mail.example.com
Set-PopSettings -X509CertificateName mail.example.com
# 4. Restart IMAP and POP
Restart-Service MSExchangeIMAP4,MSExchangeIMAP4BE,MSExchangePOP3,MSExchangePOP3BE
- SMTP
- Only towards the outside: the transport between the Exchange servers is secured by the self-signed default SMTP certificate. Replacing it with Enable-ExchangeCertificate -Services SMTP -Force disturbs that transport.
- Internal certificates
- The Exchange back end site (port 444) and OAuth keep their own certificates. The old certificate stays in the store.
- Key
- Exchange Server SE accepts ECC certificates only with a dedicated override. Choose the key type RSA 2048 when you add the domain.
- DAG
- Every server in the DAG needs the certificate, preferably not all at once.
- How often
- Since March 2026 public certificates are valid for at most 200 days, from 2029 for only 47 days. The replacement is then due roughly every month, on every Exchange server.
The agent on the Exchange server handles every step itself.
The Acmefyer server obtains the certificate from the certificate authority, for example for mail.example.com and autodiscover.example.com, and renews it about 30 days before expiry. The Acmefyer agent runs as a service on the Exchange server, picks up the new certificate there and installs it locally.
The Exchange server needs no open port and no internet access for this, and the Acmefyer server stores no administrator passwords. The connection only goes from the agent to the server.
- Import
- Import the new certificate into Exchange. One that is already imported is just enabled again.
- Enable
- For client access: IIS (Default Web Site), IMAP and POP. SMTP only with the switch “SMTP from the Internet”, and then only on the receive connectors for mail from the Internet.
- IMAP, POP
- Set the certificate name (X509CertificateName) to a name the new certificate covers and restart both services.
- Verify
- Afterwards the agent checks whether port 443 serves the new certificate. If not, it enables the previous one for IIS again. If port 444 or the internal transport certificate changes, it sets it back.
- DAG
- One deployment per Exchange server with its agent. Acmefyer never rolls out to all of them at once, but with at least one hour between two servers.
- Detection
- The agent detects Exchange on its server and suggests the matching deployment.
- 01
Add a domain
mail.example.com and autodiscover.example.com, with the key type RSA 2048 and validation via HTTP-01 or DNS-01.
- 02
Install the agent
Run the setup package on the Exchange server. The agent installs itself as a service.
- 03
Create the deployment
The agent has detected Exchange. One click creates the deployment.
- 04
Done
From now on Acmefyer renews the certificate in time and reports every result.
