This article will give you some information about how to use SMTPDiag. SMTPDiag is a diagnostic tool that is used to determine if Simple Mail Transfer Protocol (SMTP) and Domain Name System (DNS) are configured to reliably deliver mail to an external e-mail address.
SmtpDiag is a troubleshooting tool designed to work directly on a Windows server with IIS/SMTP service enabled or with Exchange Server installed. It utilizes the same APIs as Windows and Exchange in order to diagnose configuration and connection issues involving SMTP and DNS.
SMTPDiag has two required and two optional arguments, and a built-in Help.
SMTPDIAG has a simple syntax as shown in the following example.
You can specify an external DNS Server in the Exchange System Manager.
SMTPDiag issues DNS queries using UDP and TCP to validate that the queries will succeed.
You can use SMTPDIAG with the /V argument. This provides more information for every argument.
Searching for Exchange external DNS settings.
Computer name is LONDON.
VSI 1 has the following external DNS servers:
There are no external DNS servers configured.
Checking SOA for it-training-grote.de.
Checking external DNS servers.
Checking internal DNS servers.
Checking TCP/UDP SOA serial number using DNS server [192.9.200.113].
TCP test succeeded.
UDP test succeeded.
Serial number: 2004122525
SOA serial number match: Passed.
Checking local domain records.
Starting TCP and UDP DNS queries for the local domain. This test will try to validate that DNS is set up correctly for inbound mail. This test can fail for 3 reasons.
1) Local domain is not set up in DNS. Inbound mail cannot be routed to local mailboxes.
2) Firewall blocks TCP/UDP DNS queries. This will not affect inbound mail, but will affect outbound mail.
3) Internal DNS is unaware of external DNS settings. This is a valid configuration for certain topologies.
Checking MX records using TCP: nwtraders.msft.
A: nwtraders.msft [192.9.200.113]
Checking MX records using UDP: nwtraders.msft.
A: nwtraders.msft [192.9.200.113]
Both TCP and UDP queries succeeded. Local DNS test passed.
Checking remote domain records.
Starting TCP and UDP DNS queries for the remote domain. This test will try to validate that DNS is set up correctly for outbound mail. This test can fail for 3 reasons.
1) Firewall blocks TCP/UDP queries which will block outbound mail. Windows 2000/NT Server requires TCP DNS queries. Windows Server 2003 will use UDP queries first, then fall back to TCP queries.
2) Internal DNS does not know how to query external domains. You must either use an external DNS server or configure DNS server to query external domains.
3) Remote domain does not exist. Failure is expected.
Checking MX records using TCP: it-training-grote.de.
MX: mailin.webmailer.de (10)
A: mailin.webmailer.de [192.67.198.37]
A: mailin.webmailer.de [192.67.198.48]
A: mailin.webmailer.de [192.67.198.32]
Checking MX records using UDP: it-training-grote.de.
MX: mailin.webmailer.de (10)
Both TCP and UDP queries succeeded. Remote DNS test passed.
Checking MX servers listed for
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
Connecting to mailin.webmailer.de [192.67.198.32] on port 25.
Received:
220 mailin.webmailer.de ESMTP Sendmail 8.13.1/8.13.1; Sat, 25 Dec 2004 09:37:58 +0100 (MET)
Sent:
ehlo nwtraders.msft
Received:
250-mailin.webmailer.de Hello I89ae.i.pppool.de [85.73.137.174], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250 HELP
Sent:
mail from: <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>
Received:
250 2.1.0 <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>... Sender ok
Sent:
rcpt to: <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>
Received:
250 2.1.5 <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>... Recipient ok
Sent:
quit
Received:
221 2.0.0 mailin.webmailer.de closing connection
Successfully connected to mailin.webmailer.de.
Connecting to mailin.webmailer.de [192.67.198.48] on port 25.
Received:
220 mailin.webmailer.de ESMTP Sendmail 8.13.1/8.13.1; Sat, 25 Dec 2004 09:38:00 +0100 (MET)
Sent:
ehlo nwtraders.msft
Received:
250-mailin.webmailer.de Hello I89ae.i.pppool.de [85.73.137.174], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250 HELP
Sent:
mail from: <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>
Received:
250 2.1.0 <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>... Sender ok
Sent:
rcpt to: <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>
Received:
250 2.1.5 <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>... Recipient ok
Sent:
quit
Received:
221 2.0.0 mailin.webmailer.de closing connection
Successfully connected to mailin.webmailer.de.
Connecting to mailin.webmailer.de [192.67.198.37] on port 25.
Received:
220 mailin.webmailer.de ESMTP Sendmail 8.13.1/8.13.1; Sat, 25 Dec 2004 09:38:01 +0100 (MET)
Sent:
ehlo nwtraders.msft
Received:
250-mailin.webmailer.de Hello I89ae.i.pppool.de [85.73.137.174], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250 HELP
Sent:
mail from: <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>
Received:
250 2.1.0 <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>... Sender ok
Sent:
rcpt to: <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>
Received:
250 2.1.5 <
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>... Recipient ok
Sent:
quit
Received:
221 2.0.0 mailin.webmailer.de closing connection
Successfully connected to mailin.webmailer.de.
SMTPDIAG is a great tool to determine SMTP and DNS problems in your Exchange organization. I like this tool because it sees the SMTP Message Flow like the two core components IIS and Exchange.