Microsoft has created a free tool called SMTPDiag to do exactly that. It's a command-line diagnostic program that produces a detailed report about every step of the process involved in sending mail via SMTP. Since it works using standard SMTP protocols and not the Exchange/MAPI application program interface, it can be used on Internet Information Server (IIS), Exchange, or any industry-standard SMTP server.
The program takes at least two arguments: a sender and a recipient e-mail address. You can also specify a –d switch to provide a target DNS server; otherwise, the default DNS lookups will be used. (This cannot be used when sending e-mail via IIS.) The /v option provides verbose feedback and probably should be enabled by default, since the more detailed the information the program provides, the better.
When launched, SMTPDiag attempts to verify the start of authority records for the remote domain, and attempts to do this through both UDP and TCP queries. (If both UDP and TCP queries fail, this is the first sign something's wrong.)
It then resolves the local and remote MX/A records to make sure they exist, connects to all available mail servers published as MX records, does an EHLO, and attempts to perform a send. If any particular record or connection fails, it'll be annotated in the program's output (which is echoed to stdio).
SMTPDiag color-codes its output for easy analysis. Anything green indicates a success; anything red indicates a failure.
About the author: Serdar Yegulalp is editor of the Windows 2000 Power Users Newsletter and a regular contributor to SearchExchange.com.
Do you have comments on this tip? Let us know.
More information from SearchExchange.com:
Please let others know how useful this tip is via the rating scale below Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize.