How To Test Outbound Mail Flow With IIS

I was asked to see if there was a problem with an IIS SMTP server.  I’ve been asked this one many times before in the past.  The first thing I do is to check DNS (just like with Active Directory).  I verified I could look up external MX records.  Next I checked firewall rules and connectivity.  I could telnet to an external mail server on port 25, e.g. telnet mailsvr.destdomain.com 25

Next up is a tool called SMTPDiag.  I’ve used this one a good bit for this sort of problem.  You need to know which things to ignore in this scenario where there is no Exchange server.  In the past when I was with a hosting company we had a customer who reported an issue with his server sending email.  SMTPDiag did some tests to verify SMTP was OK and then sent test mails.  The destination that was reported in the trouble ticket bounced the tests with an SMTP code … the sender was being rejected for being a spammer.  It turns out he probably was being identified as a spammer due to the large amounts of mail he sent.  In my case today, everything was good.

The final step was to manually send a mail.  You can use notepad to write an email and drop it into the SMTP pickup folder.  Open notepad and add something like:

to:tbill@externaldomainname.com

from:testuser@internaldomain.com

subject:This is a test.

this is a test. The date is 23/01/2009 and the time is 15:06.

Save this in Inetpubmailrootpickup without a file extension (use "", e.g. "testmail").  The file will disappear when SMTP has sent it.  My test is to send it to somewhere like GMail or Hotmail.  That worked fine for me on this ticket.

Everything seems fine.  This is often the case when it comes to tickets I’ve had related to email.  The server I’m responsible for works fine but the destination server(s) have issues.  More often than not, it’s been antivirus servers acting up or slowing things down.

One thought on “How To Test Outbound Mail Flow With IIS”

  1. Your test file format is in an incorrect order for IIS 7.5.
    It needs to be:

    from:user@somedomain.com
    to:user@somedomain.com
    cc:user@somedomain.com

    This is a manual text only test. This is from the IIS Server SMTP service.

Leave a Reply

Your email address will not be published. Required fields are marked *

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