Windows Server 2022: "SMTP Server" feature will be uninstalled by updates

Windows[German]A blog reader has contacted me by e-mail, because he faced an issue. On a Windows Server 2022, the "SMTP Server" feature is uninstalled with every update installation. This has now happened for the second time around Patchday. After researching, the feature has already been quoted as deprecated in Windows Server 2012 and will be dropped in Windows Server 2025. Microsoft seems to remove the role via monthly security updates.


The SMTP Server feature

The SMTP Server feature is a role that can be installed under Windows Server for the IIS. Instructions for setting up the SMTP Server service under Windows Server 2019 can be found in this article. However, this seems to be a problem with Windows Server 2022 – I found the post IIS SMTP Windows Server 2022, where it says: "Microsoft doesn't really like its IIS and downstream things. We're supposed to be in the cloud." The issue there is that the mail service terminates after a Windows update, either when the MMC is called or after a few emails have been sent. This bug is analyzed in the article.

Updates remove "SMTP Server" feature

A blog reader contacted me by e-mail because he was having problems with the "SMTP Server" feature. The scenario: A Windows Server 2022 Standard is used as the basis. An Internet Information Services (IIS) is running on this server as the basis, which is installed as a role.

Administrators use the "SMTP Server" feature on the respective server to forward internal emails. This service used to run on Windows Server 2019. Some time ago, the "SMTP Server" feature was moved from Windows Server 2019 to Windows Server 2022. So far so good, the approach works – that's not the problem.

But the blog reader and administrator now has a big problem, which he has been observing for two months now. After Patchday 04/2024, the "SMTP Server" feature, which is integrated in IIS, was suddenly no longer installed. But mails were still being forwarded.

I assume that the service in question was still available and running, but the relevant role for the "SMTP Server" feature was no longer displayed as installed.

Somewhat surprised, the reader then reinstalled the feature and found that the configuration was still available. After the current patchday 05/2024, exactly the same thing happened again – the feature was no longer installed but the SMTP service was still working.


Another entry on the web

The reader asked if I had noticed anything about this problem, which I had to deny. The reader also referred me to the Reddit post SMTP Server & Windows Server 2022 = supported? or end of support? where someone posted the following.

Is SMTP Server still supported by Microsoft? I keep reading that it isn't, and yet it's a feature that can be installed on Windows Server 2022. If it's not supported, why would it be an installable feature in the latest OS version?

This is where I read it wasn't supported: Configure SMTP E-Mail in IIS 7 and higher | Microsoft Learn. It says "the IIS SMTP Virtual Server Component that is mentioned in this article is part of IIS 6.0, the support for which has ended with the support of Windows Server 2003. To relay emails to Exchange OnPrem and/or Office 365, use one of the supported versions of Exchange Server, as we no longer support doing so with IIS SMTP. "

There it is noted that Microsoft has somehow discontinued support, but this can only be found out around three corners. In the thread, there are several mentions that setting up the SMTP service requires a lot of work – the approaches are also described. It looks as if the old code from Windows Server 2019 has been transferred to Windows Server 2022, but the stuff is not really maintained. The thread ends with the following post, which is a month old:

Just a heads up, the latest security update for Windows Server 2022 automatically removes the "SMTP Server" feature from your system, if you had it enabled/installed.

At least the Simple Mail Transport Protocol service is left behind, so the server will still send emails. But the IIS6 GUI and management tools are gone.

So the blog reader's observation is confirmed, the update removes the role but leaves the service. However, reading through the thread, I'm not very optimistic that the whole thing can still be made stable. It may come down to reinstalling the role after every patchday if you still need to use the IIS6 GUI and management tools. In the thread there is a second post Running a local SMTP server on Windows 2022 linked, which describes the setup.

Deprecated in Windows Server 2012

After writing the German edition of this blog post, a blog reader pointed out, that this feature has already been quoted as deprecated in Windows Server 2012.

SMTP and the associated management tools are deprecated. Though the functionality is still available in Windows Server 2012, you should begin using System.Net.Smtp. With this API, you will not be able to insert a message into a file for pickup; instead configure Web applications to connect on port 25 to another server using SMTP.

Dropped in Windows Server 2025

The reader wrote: "Otherwise, I can't find any entry that Microsoft has discontinued the feature in Server 2022. In the new Server 2025 (Preview), the feature is listed as "removed": This can be read in the Microsoft post Features removed or no longer developed starting with Windows Server 2025 (preview)." According to this Microsoft Learn article, however, the feature will only be removed from support from this server version onwards.

Use a third party product

German blog readers recommend to use a third party mail server to provide this feature in Windows Server 2022 onward. One user mentioned Mailpit, an open source SMTP server, that can be used with sc.exe as a service. Another solution may be hmailserver, which is also open source, but is no more actively in development. But there is this project promising also a solution.

Cookies helps to fund this blog: Cookie settings

This entry was posted in issue, Update, Windows and tagged , , . Bookmark the permalink.

One Response to Windows Server 2022: "SMTP Server" feature will be uninstalled by updates

  1. Matt S. says:

    I use hmail for this very purpose. I think I have it on Server 2022 but I might be mistaken and it might be one of my Server 2019 servers. Been working fine for me for more than a year now.

Leave a Reply

Your email address will not be published. Required fields are marked *