Today, we wanted to install and set up an SMTP proxy on a Windows Server 2022 that would receive mails from internal multifunctional devices (scanner, fax, printer) and forward them via smarthost to an Exchange Online. The installation was quickly completed via the Server Manager. However, configuring the SMTP Virtual Server in the IIS Snap-In of the MMC console was not possible. Every attempt to click on the server properties caused the MMC to crash with the familiar error message: “A snap-in error was detected. It is recommended that you shut down and restart the MMC.”
Apparently, a known issue with Server 2022
After a brief research, we found out that this is a general problem with Server 2022 and the IIS Snap-In. Multiple forums reported that the MMC crashes as soon as one clicks on properties. We couldn’t identify this error under Server 2019 and below. Installing an “older” operating system or using a Linux server (e.g. with Postfix) was not an option for us.
Alternatively, we could have manually adjusted all settings in the IIS’s MetaBase.xml. But this is quite the advanced method, and since we need to configure relay restrictions regularly, it’s not a feasible path.
The solution for the IIS MMC in MetaBase.xml
The solution was eventually found in the aforementioned MetaBase.xml in the IIS directory at C:\Windows\System32\inetsrv. Follow these steps to finally access the properties of the SMTP server, e.g., to enter a SmartHost or to change authentication from anonymous access to standard authentication:
- Open the CMD as an administrator.
- Stop the SMTPSVC service using net stop smtpsvc
- Stop the IISADMIN service with net stop iisadmin
- Navigate to the directory C:\Windows\System32\inetsrv
- Edit the MetaBase.xml file, for example in Notepad
- Search for: <IIsSmtpServer Location =”/LM/SmtpSvc/1″
- Add the entry RelayIpList=””
- Save the file
- Restart the two previously stopped services in the CMD using net start smtpsvc and net start iisadmin
Problem solved, time to configure.
Now everything works, and you can start setting up the SmartHost, port binding, authentication, etc., via the UI and don’t need to mess around in text files 🙂