Exchange 2003/2007, IIS 6 Metabase and SMTP domains
Recently I ran into a very strange issue with Exchange 2003, IIS 6 and SMTP domains. The environment is a mixed Exchange 2003/2007 site with about 10 public SMTP domain names for which this Exchange org is responsible for. Since the beginning of my time as the Administrator for this system the recipient policy settings have been the same. All the SMTP domains are listed in the recipient policy but some are unchecked. For years this has been the case and we’ve never had a problem. But something must have happened recently, because the last few days have been busy for me trying to figure out what was causing a mail delivery issue that resulted in all incoming mail for several of the legitimate public SMTP domains to bounce back to the sender.
After some research and manual testing to try to identify what was causing the problem, I found a strange thing. In the IIS 6 metabase on one of the Exchange 2003 servers, the public SMTP domains were missing from the “domains” key under LMSMTPSVC1DOMAIN. Two of our domains were listed but all the rest were missing. If the domains are not listed in the IIS metabase for SMTP, the server will reject mail sent to those domains because it doesn’t realize that its responsible for receiving mail for them. So I decided to do a test, I opened up the recipient policy and put a check next to all public SMTP domains and waited a minute before refreshing the IIS metabase information. When I checked again, I found all the public SMTP domains were correctly listed in the IIS metabase now.
Earlier in the day I was trying to send test messages via telnet through SMTP. When I would try to send a test message to a user on one of the affected domains I would get the error “unable to relay for firstname.lastname@example.org”. After refreshing the IIS 6 metabase, my telnet test messages were being accepted successfully and I confirmed that the user was receiving them. Again, the recipient policies have been the same since the beginning of the AD in this site. I have no idea why all of a sudden we would see incoming mail problems. I can only speculate what might have happened, perhaps a quirk due to an unexpected DC shutdown, or maybe its some weird fluke with IIS 6 and some other third party apps that have SMTP event hooks that caused it. I really have no idea and I don’t have a screenshot of the IIS 6 metabase config from before the time when we started to have problems.
What fixed the problem was to make sure all the public SMTP domains appeared in the IIS 6 metabase. After that was taken care of, mail delivery issues were fixed and I was able to verify this using manual telnet test messages. So I know what the problem was and I know what fixed it, I just don’t know what actually caused the problem in the first place.
If you don’t have a metabase explorer, you can use the one included in the IIS 6 resource kit, which is available as a download from Microsoft.