Home / Acmefyer / Exchange certificate

AcmefyerAgent-based Certificate Manager

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.

01By handWhat every replacement involves

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.
02With AcmefyerWhat the agent takes care of

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.
03SetupSet up once, then it runs on its own
  1. 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.

  2. 02

    Install the agent

    Run the setup package on the Exchange server. The agent installs itself as a service.

  3. 03

    Create the deployment

    The agent has detected Exchange. One click creates the deployment.

  4. 04

    Done

    From now on Acmefyer renews the certificate in time and reports every result.

04FAQFrequently asked questions about the Exchange certificate

Which Exchange versions does Acmefyer support?

Exchange Server SE and Exchange Server 2019. The agent runs on every Exchange server for this.

Can I use a Let’s Encrypt certificate for Exchange?

Yes. Outlook, OWA, ActiveSync and Autodiscover trust Let’s Encrypt like any other public certificate authority. Requirement: all names in the certificate are public names such as mail.example.com. No public certificate authority issues internal names such as ex01.corp.local.

Does SMTP need the new certificate?

Only for mail from the Internet, and only if you want it. Acmefyer always leaves the transport between the Exchange servers with the self-signed default SMTP certificate. With the switch “SMTP from the Internet” the agent puts the new certificate on the receive connectors that take mail from the Internet on port 25 and checks through STARTTLS that port 25 serves it. Otherwise the connectors get their previous setting back.

Does Acmefyer also replace internal Exchange certificates?

No. The certificate of the Exchange back end site (port 444), the default SMTP certificate for the transport between the servers and the OAuth certificate stay unchanged. The agent compares port 444 and the internal transport certificate before and after the replacement and sets them back if anything changed. Other deployments such as IIS or HTTP.sys leave the Exchange sites out entirely on an Exchange server.

What happens if the replacement fails?

After the replacement the agent checks whether port 443 serves the new certificate. If not, it enables the previous certificate for IIS again and Acmefyer reports the error. Acmefyer retries a failed target after 5 minutes, then at growing intervals.

Does this work in a DAG?

Yes. You create one deployment per Exchange server with its agent. Acmefyer then distributes the certificate server by server, at least one hour apart, so that never all servers are switched at once.

Do I need a wildcard certificate for Exchange?

No. A certificate with the names mail.example.com and autodiscover.example.com is enough. A wildcard certificate works too. For IMAP and POP the agent then sets a name without the wildcard.