4

This is a new installation of Server 2022 Standard 21H2. I'm trying to configure the SMTP Server so that a client application can send emails internally.

The first thing I noticed is that when I open IIS 6.0 Manager and right click the SMTP virtual server, it usually generates the following error:

SMTP Server Error

If I try often enough, I can get in and configure the settings. The next thing though is that whenever I attempt to send a message through the smtp server, the smtp service stops and the following event is logged:

Event Log

Can anyone suggest where I would start to troubleshoot this please?

Ian Pendlebury
  • 41
  • 1
  • 1
  • 2
  • 1
    https://techcommunity.microsoft.com/t5/windows-server-insiders/server-buld-20303-1-iis-6-manager-crashes-trying-to-edit-smtp/m-p/2215174 – Vadim Jan 03 '22 at 11:04
  • @IanPendlebury, your solution of using hMailServer seems to me like the best way to solve this. I think you should answer yourself with that, as it would help others outs – julien.giband Apr 07 '23 at 13:46

5 Answers5

3

My findings are similar to the other answers here, but it seems I needed to add a few steps (under Microsoft Windows Server 2022 Standard):

  • By default, I can enable SMTP and listen for connections, but when I attempt to send email to its port, the SMTP service crashes. Also, when I attempt to access Properties of [SMTP Virtual Server #1], IIS 6.0 Manager pops up this Snapin Error:

MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC.

Here is the procedure that worked for me:

  1. Stop the Simple Mail Transfer Protocol (SMTP) service
  2. Stop the IIS Admin Service service
  3. Edit (privileged session) C:\Windows\System32\inetsrv\MetaBase.xml
  4. Under <IIsSmtpServer Location ="/LM/SmtpSvc/1", Set RelayIpList="" as described in @Andrew's answer to this question, and save the file
  5. Start the Simple Mail Transfer Protocol (SMTP) service
  6. Important: now, run IIS 6.0 Manager, right-click [SMTP Virtual Server #1], click Properties, open the Access tab, click the Connection... button and click OK and then do the same with the Relay... button.
  7. Now click OK to close the [SMTP Virtual Server #1] window.

The preceding updates your MetaBase.xml file and causes SMTP to function correctly.

CODE-REaD
  • 223
  • 2
  • 9
  • For ref, I had to set `RelayIpList=""` in both `"/LM/SmtpSvc"` and `"/LM/SmtpSvc/1"` for who knows why. – admalledd Jun 13 '23 at 16:16
1

In order to fix that problem and make the SMTP virtual server editable in the IIS 6.0 Manager and also stop the crashes when the server receives an email, do the following:

  1. stop the SMTP service
  2. open the file C:\Windows\System32\inetsrv\MetaBase.xml
  3. locate the Section <IIsSmtpServer Location ="/LM/SmtpSvc/1" (the "1" is important)
  4. add the following attributes:

  • AccessSSLFlags="0"

  • AuthFlags="AuthAnonymous"

  • IPSecurity="18000080200000807800008080000080010000008800000000000000000000000400000003000000020000000200000002000000e00000009c000080020000000100000002000000f000000090000080020000000200000002000000fe00000094000080020000000200000004000000000000008800008000000000000000000000000000000000ffffffff7f000001fffff000fffffe00c2f67600ffffe000d4190000"

  • RelayForAuth="4294967295"

  • SaslLogonDomain=""

  • SmtpInboundCommandSupportOptions="7697601"


  1. start SMTP service again

I case you wonder, these attributes are found in the same section on Windows Server 2019. You can also just copy this whole section from a Windows 2019 MetaBase.xml onto you Windows 2022 server...works as well

Do no ask me why this works or why these attributes are different on Windows 2019 and 2022. It's just how I get all our 2022/IIS/SMTP servers running....copy over the config from a Windows 2019 system.

user954709
  • 11
  • 1
  • 1
    Thanks for the reply. A few weeks ago I gave up trying to fix this. I removed the SMTP Server and installed the 3rd party hMailServer. It works well. I wonder if i'm brave enough to have another go with the inbuilt SMTP server?. I would prefer to keep everything under one roof We don't have any 2019 servers to copy from. We went from SBS 2008 straight to Server 2021. – Ian Pendlebury Feb 14 '22 at 10:54
  • 3
    Unfortunately, suggestion by user954709 didn't do the trick for me. – user968465 May 31 '22 at 21:26
  • This is simply a set of preset parameters for the IIS SMTP server. Will only work if those parameters mostly suit your use case, which will probably not be the case unfortunately – julien.giband Apr 07 '23 at 13:43
1

We found that doing the following worked, and can now edit the settings in the II6 Manager without errors (and without crashing when applying settings) every time:

  1. Stop SMTPSVC service [Display Name: Simple Mail Transfer Protocol (SMTP)]
  2. Stop IISADMIN service [Display name: IIS Admin Service]
  3. Edit "C:\Windows\System32\inetsrv\MetaBase.xml"
  4. Find: <IIsSmtpServer Location ="/LM/SmtpSvc/1"
  5. Add (Settings are alphabetical): RelayIpList=""
  6. Save file
  7. Start IISAdmin Service
  8. Start SMTPSVC service

You can now open the Internet Information Services (IIS) 6.0 Manager (InetMgr6.exe) and work like normal. The setting above relates to the Access Tab > Relay Restrictions section, but doesn't set anything in it (i.e. "all except the below list" with a blank list).

After setting this value you can change it to what you need it to be. (i.e. the value doesn't need to be 'null' for the fix to work, just so long as the variable is present in the file).

The above has been tested on a few new installs of Windows Server 2022, and has worked for us every time. If you have done an upgrade there are some other things to consider (seems like the SMTP service is not installed after upgrade so will require a backup of the settings that can be applied post reinstalling the service. But that is discussed in other topics).

PS: Remember to set the SMTPSVC service to start "automatically". By default its set to "manual".

Andrew
  • 31
  • 2
0

i tried this but iisAdmin service won't start after doing so -- error --The IIS Admin Service service terminated with the following service-specific error: Invalid Signature.

any ideas?

0

Microsoft announced the death of SMTP components with Windows Server 2012,

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh831568(v=ws.11)#smtp

Thus, any attempt to bring ashes back won't end up very well.

Please switch to other SMTP alternatives.

Lex Li
  • 1,235
  • 8
  • 10