When right-click on [SMTP Virtual Server #1] in IIS 6.0 Manager and SMTP Server, you may get this error:
"MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC."
Here's the fix:
- Stop SMTPSVC service [Display Name: Simple Mail Transfer Protocol (SMTP)]
- Stop IISADMIN service [Display name: IIS Admin Service]
- Edit "C:\Windows\System32\inetsrv\MetaBase.xml"
- Find: <IIsSmtpServer Location ="/LM/SmtpSvc/1"
- Add (Settings are alphabetical): RelayIpList=""
- Save file
- Start IISAdmin Service
- Start SMTPSVC service
以下提供 PowerShell 程式,直接執行完成上述步驟
Stop-Service -Name SMTPSVC -Force
Stop-Service -Name IISADMIN -Force
$metaBasePath = "C:\Windows\System32\inetsrv\MetaBase.xml"
[xml]$xml = Get-Content $metaBasePath
foreach ($node in $xml.configuration.MBProperty.IIsSmtpServer) {
    if (-not $node.RelayIpList) {
        $node.SetAttribute("RelayIpList", "")
    }
}
$xml.Save($metaBasePath)
Start-Service -Name IISADMIN
Start-Service -Name SMTPSVC
沒有留言:
張貼留言