Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Free diagnostic tool for SMTP servers

SMTPDiag is a no-cost command-line diagnostic tool that produces a detailed report about every step of sending mail via SMTP.

As informative as diagnostic logs can be, it often helps to have detailed step-by-step feedback about the behavior of one's SMTP server. This way, if there is a failure in some obscure step of the process (such as an invalid DNS record or a port blockage), it can be detected immediately.

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:

  • Tip: Built-in Exchange tool fixes SMTP components
  • Tip Library: SMTP expert technical advice
  • 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.

    Dig Deeper on Exchange Server setup and troubleshooting

    Start the conversation

    Send me notifications when other members comment.

    Please create a username to comment.

    -ADS BY GOOGLE

    SearchServerVirtualization

    SearchCloudComputing

    SearchSQLServer

    SearchEnterpriseDesktop

    SearchVirtualDesktop

    Close