IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022

IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022

This will be a “notes from the field” type of blog post where I will guide you to successfully execute an IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022. In this case, the original operating system version is Windows Server 2019. However, these notes can be used for upgrades between other Windows Server versions as well.

Yes, there are still valid reasons to run an SMTP relay service today. I use SendGrid as a smart host with these and I actually have these setup behind a KEMP LoadMaster for High Availability.

What could go wrong?

What could go wrong? Well, nothing unless you didn’t plan certain things in advance. Below are the issues you will face. and need to prepare for and fix in order to perform an IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022

  • The IIS 6 Management Console will be missing

For some reason that gets dropped during the in-place upgrade. The fix is to reinstall it. Easy enough.

  • Your SMTP Virtual services configuration will be wiped out during an in-place upgrade.

Yes, it will be a very empty console. Which is a scary experience if you did not prepare for it.

All your SMTP virtual servers will be gone

The trick is to create a backup and restore it. That way you get your configuration back. So, first of all, create a backup of your IIS configuration. We will go over this later. Secondly, before you can restore your backup you need to reinstall the IIS 6 Management Console as stated above. When you have restored the backup reboot the server, but before you do reconfigure the Simple Mail Transport Protocol service to start automatically.

  • Simple Mail Transport Protocol Service

The Simple Mail Transport Protocol Service will be set to reset to its default, which is to start manually start instead of automatically. This one is easily fixed but you need to remember to do so as your SMTP Virtual Servers will not be running after a restart. And as you keep your servers patched that will be at least once a month probably.

Step-by-step

  • Backup the current configuration

The easiest way to do this is via appcmd. Open an elevated command prompt and navigate to C:\Windows\System32\inetsrv. Run the following command.

appcmd add backup MYBACKUPNAME

The backup is stored under C:\Windows\System32\inetsrv\Backups\MYBACKUPNAME. Verify it is there, it should contain the following files:

  1. administration.config
  2. applicationHost.config
  3. MBSchema.xml
  4. MetaBase.xml
  5. redirection.config
IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022
Verify your backup files are there

This folder is preserved during the upgrade but you can always grab a copy to be on the safe side.

  • Perform the in-place upgrade

This is the normal process, nothing special about it unless you run into trouble, which is not very likely in well-maintained environments.

  • Reinstall the IIS 6 Management console

This is easily done via the Add Roles and Features Wizard and does not require a reboot.

IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022
Reinstall the IIS 6 Management Console
  • Set the Simple Mail Transport Protocol service to start automatically
IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022
Set the Simple Mail Transport Protocol service startup type to Automatic
  • Restore your IIS backup

Open an elevated command prompt and navigate to C:\Windows\System32\inetsrv. Run the following command.

appcmd restore backup MYBACKUPNAME

  • Restart the server

When you have restarted the server open the IIS 6 Management console. Your SMTP virtual Services should be backup up and running.

IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022
You have your SMTP Virtual Servers back!

Test your SMTP functionality via a PowerShell script for example to verify all is well.

Conclusion

In-place upgrades work quite well but certain roles and configurations have their quirks and issues to solve. Some lab work to test scenarios and their outcome is helpful when preparing an in-place upgrade.

This is the case for IIS 6.0 based SMTP Service role. We have shown you how to work around this and successfully perform an IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022. The thing is, this is not related to Windows Server 2022, it is an IIS 6.0 issue.

With virtual machines leverage the luxury of checkpoints for fast and easy recovery before you begin. Also, make sure you have a tested backup to restore. Always have options and avoid painting yourself into a corner.

12 thoughts on “IIS 6.0 SMTP Service in-place upgrade to Windows Server 2022

  1. https://blog.rmilne.ca/2021/12/08/iis-smtp-virtual-server-component-no-longer-supported/
    Thanks for the extensive documentation of getting this to work again but it seems this time it’s really deprecated with Windows Server 2022 and not supported anymore I guess. I always like to offer the client a workaround but not to the extend that it’s not supported and therefore take the blame when things fail when eventually an update is the final nail in this workaround 😉

    • The role is still there so it should work. The upgrade path is a bit convoluted but hey, even some recent roles have some issues to take care of. For now, I have two redundant setups running on W2K22 upgrades like this behind Kemp load balancers and all is well.

  2. Pingback: Issues with Inplace Upgrades from 2012R2 to 2019 | Welcome to Pariswells.com

  3. And of course when one did the upgrade BEFORE reading this article (no no backup was created), restore the 5 files from proper machine backup (surely everybody has them done daily), and carry on from there

  4. I had the same problem but MMC failed with “MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC” message. I removed then reinstalled the features for smtp and still the MMC misbehaves. I read where Microsoft is no longer supporting their SMTP service and the failure of the MMC is an example of their intent. Back to 2019 and I guess I’ll have to find a replacement for their simple SMTP service. Sigh…

  5. Thank you very much! We had the same problem after an inplace upgrade from 2016 to 2019. Your post was the solution!

  6. just done an in-place upgrade W2K8R2 > W2K12R2 > W2K19 > W2K22
    your tutorial helped me a lot since i tottaly lost smtp relay support on W2K22. (was working fine on W2K19)
    FYI : i simply took the 5 conf files manually from an old W2K8R2 backup with guest file explorer and pasted them into the inetsrv backup folder and ran the appcmd command.
    my old smtp relay is working again, awesome!
    thansk a lot

    • Cool. Happy it helped. Extra tip: on a new W2K22 server install you will not find Lecagy IIS and as such SMTP as a feature, but using DISM you can still enable it! dism /online /enable-feature /featurename:IIS-LegacySnapIn /all

Leave a Reply, get the discussion going, share and learn with your peers.

This site uses Akismet to reduce spam. Learn how your comment data is processed.