Retiring the last Exchange server with ECP Lite and MailRelay

All mailboxes are in Exchange Online, yet the on-premises Exchange server keeps running – only for recipient management and as an SMTP relay. ECP Lite and MailRelay take over exactly these jobs. Here is what to keep in mind.

Illustration of Microsoft 365 and the cloud

Many companies moved to Exchange Online long ago: all mailboxes are in Microsoft 365, and users and passwords come from on-premises Active Directory via Entra Connect. Still, an Exchange server keeps running in the server room – the "last Exchange server". It has to be patched, licensed and secured although it no longer hosts a single mailbox. Exchange Server 2016 and 2019 have been out of support since October 2025, and their successor Exchange Server SE requires a subscription.

What the last Exchange server is still needed for

  • Recipient management: as long as on-premises Active Directory is the source, e-mail addresses, aliases, address book visibility or the conversion to a shared mailbox are maintained on-premises and synchronized to the cloud. Until now, that required Exchange management.
  • SMTP relay: scanners, multifunction printers, business applications and servers send their mail to the Exchange server, which passes it on to Exchange Online.

Two lightweight tools by PriCoSoft take over exactly these two jobs.

Dividing the work

  • ECP Lite for addresses, users and mailboxes: a web UI in the style of the Exchange admin center. It maintains e-mail addresses and aliases, UPN, address book visibility, profile fields and custom attributes and converts user mailboxes to shared mailboxes – directly in Active Directory, with Microsoft Entra ID sign-in and an audit log. Entra Connect brings the changes to the cloud as usual. ECP Lite is open source (MIT).
  • MailRelay for devices and applications: accepts mail from on-premises systems and delivers it to Exchange Online over TLS – via a connector with a certificate, by IP address or with OAuth 2.0. Every message can be tracked, and the Lite edition is free.

So: uninstall Exchange and you're done?

Almost. There are a few points you should know before you switch the server off:

  • Shut down, don't uninstall. If recipients are still managed in on-premises Active Directory, the Exchange objects in AD must stay. Microsoft explicitly describes this path: clean up the hybrid configuration, shut down the last Exchange server and rebuild it later – but don't uninstall it with Setup. Uninstalling removes information from AD that is needed to manage the Exchange attributes.
  • Microsoft support. For the Exchange attributes, Microsoft names only the Exchange cmdlets as supported tools, for example via the Exchange Management Tools (Exchange 2019 CU12 or later, or Exchange Server SE), which work without a running server. ECP Lite writes the attributes directly to AD – this works, but it is not a Microsoft-supported replacement for those cmdlets. Keep the Management Tools on an admin workstation for special cases such as creating new remote mailboxes or distribution groups; ECP Lite handles the day-to-day maintenance in the browser.
  • The cloud path as an alternative. Microsoft now lets you move the management of Exchange attributes to the cloud (source of authority). You then maintain addresses in the Microsoft 365 Exchange admin center and may actually uninstall Exchange afterwards. For those mailboxes ECP Lite no longer applies, because on-premises changes are no longer synchronized. Which path fits depends mainly on whether you want to keep managing users in on-premises AD.
  • You need MailRelay either way. Microsoft itself says: if you still use the last Exchange server as an SMTP relay, don't shut it down. MailRelay takes over exactly that role.
  • Check first: are all mailboxes and public folders really in Exchange Online? Do the MX and Autodiscover records point to Microsoft 365? Which devices and applications send via the Exchange server (receive connector logs)? Does an application still use on-premises Exchange interfaces such as EWS?

The steps in short

  1. Inventory: mailboxes, public folders, relay clients, DNS records.
  2. Install MailRelay, set up a connector in Exchange Online and switch the devices to the new relay.
  3. Install ECP Lite and delegate the required write permissions in Active Directory.
  4. Install the Exchange Management Tools on an admin workstation (for special cases).
  5. Clean up the hybrid configuration following Microsoft's guidance and shut down the last Exchange server – don't uninstall it.
  6. Once everything works: run the Active Directory cleanup script and rebuild the old server.

The result: no Exchange server left to patch and license – you maintain recipients in the browser, and devices and applications keep sending as before. We are happy to plan and accompany the switch for you.

More articles

Running a program as a Windows service: the options compared

A business application should run on the server without anyone logged on and survive every reboot. sc.exe, the old srvany, Task Scheduler or a service wrapper – what works, where the limits are and why windows suddenly become invisible.

View all articles