Login :: Register
General Topics
HostedbyMaximumASP170x35
2005 IIS MVPs
Other IIS Sites
Microsoft Sites
Subscribe to the IIS Answers Newsletter  Subscribe to the IIS Answers Newsletter 

Subscribe to one of the best sources of information about IIS on the net. Written by Brett Hill, IIS MVP and Steve Schofield ASP.net MVP with a lot of help from the IIS community, the weekly newsletter contains useful tips, the latest news, and links of interest to those who administer IIS and related technologies. You'll recieve no spam and it's free. You can find more information and archives at http://www.iisanswers.com/newsletter Also available in RSS at http://lyris.iislists.com/read/rss?forum=iisanswers&rev=0.92

Subscribe

IIS FAQ Recent Articles and News

Current Articles | Categories | Search | Syndication

Tuesday, September 28, 2004
Troubleshooting IIS SMTP
By Bernard Cheah (Bernard) @ 2:53 AM :: IISFAQ Front Page :: 2 Comments :: 21598 Views

If you have been using IIS SMTP, you will notice that it is actually quite hard to troubleshoot SMTP related issues. Ranging from event id 4000, to mail stuck in pickup, queue and bad mail folders. Normally, I would suggest users to try the following:
XFOR: How to Test Outbound Mail Flow With a File in the Pickup Folder
http://support.microsoft.com/?id=297700

The above simply test the basic function of SMTP. Just create a plain text file with the specified format. If SMTP is working, the mail will be delivered. Now, normally when mails get stuck in the server, it is mostly due to DNS issue. Meaning the SMTP component can't resolve the recipient's email domain MX record. In IIS 5.1 and below IIS SMTP only support TCP DNS queries, if it failed the mail will not be delivered. Only W2k3 or IIS 6.0 support either TCP or UDP Mode. So, to test the whether is DNS issue, try the following kb:
XCON: Windows 2000 and Exchange 2000 SMTP Use TCP DNS Queries
http://support.microsoft.com/?id=263237

The entire process is not that user friendly and required you to do certain troubleshooting. Today or I mean just now, I came across this new diagnostic tool called SMTPDiag, sent by Chris Adam to Brett's mailing list. Awesome Tool ! It helps you to troubleshooting the DNS resolution issues, further test the connection to the remote hosts and more. It DOES NOT need Exchange 2003, it only needs SMTP component.

The tool is super tiny :) only 96k ! here's the sample output of the diagnostic process.

D:\Tools\SmtpDiag>SmtpDiag.exe “sender@sender.com“blabla@gmail.com“ /v
Searching for Exchange external DNS settings.
Computer name is XXXXX.
Failed to connect to the domain controller. Error: 8007054b  << you can ignore this

Checking SOA for gmail.com.
Checking external DNS servers.
Checking internal DNS servers.

Checking TCP/UDP SOA serial number using DNS server [xxx.xxx.xxx.xxx].
TCP test succeeded.
UDP test failed.    << W2K behavior
Serial number: 2004092100

Checking TCP/UDP SOA serial number using DNS server [xxx.xxx.xxx.xxx].
TCP test succeeded.
UDP test failed.
Serial number: 2004092100
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 tolocal 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: sender.com.
  A:     sender.com [xxx.xxx.xxx.xxx]
Checking MX records using UDP: sender.com.
  A:     sender.com [xxx.xxx.xxx.xxx]   << amazingly this test domain, can query via UDP
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: gmail.com.
  MX:    gsmtp171.google.com (10)
  MX:    gsmtp57.google.com (20)
  A:     gsmtp171.google.com [64.233.171.27]
  A:     gsmtp57.google.com [216.239.57.27]
Checking MX records using UDP: gmail.com.
  MX:    gsmtp171.google.com (10)
  MX:    gsmtp57.google.com (20)
Both TCP and UDP queries succeeded. Remote DNS test passed.

Checking MX servers listed for blabla@gmail.com.
Connecting to gsmtp171.google.com [64.233.171.27] on port 25.
Received:
220 mx.gmail.com ESMTP 73si601551rna
Sent:
ehlo sender.com

Received:
250-mx.gmail.com at your service
250-SIZE 20971520
250 8BITMIME
Sent:
mail from: <
sender@sender.com>
Received:
250 OK
Sent:
rcpt to: <
blabla@gmail.com>
Received:
250 OK
Sent:
quit

Received:
221 mx.gmail.com closing connection
Successfully connected to gsmtp171.google.com.
Connecting to gsmtp57.google.com [216.239.57.27] on port 25.

Received:
220 mx.gmail.com ESMTP v71si245850cwb
Sent:
ehlo sender.com
Received:
250-mx.gmail.com at your service
250-SIZE 20971520
250 8BITMIME
Sent:
mail from: <
sender@sender.com>|
Received:
250 OK
Sent:
rcpt to: <
qbernard@gmail.com>
Received:
250 OK
Sent:
quit
Received:
221 mx.gmail.com closing connection

Successfully connected to gsmtp57.google.com.

This is so kewl !!!!  Try it out !

Source: Bernard Cheah's IIS Blog

Comments
By ponting 'waqashbo' jhon @ 11/14/2011 2:02 AM
I vindicatory couldn't variegated your website before noesis that I rale equilateral this ism. there's a guiltless transactions to bid a add intellection in your noesis. the windup compounding you act to your visitors
bank offshore

By ponting 'waqashbo' jhon @ 11/14/2011 2:02 AM
I vindicatory couldn't variegated your website before noesis that I rale equilateral this ism. there's a guiltless transactions to bid a add intellection in your noesis. the windup compounding you act to your visitors
bank offshore

Post a Comment
You must be logged in to post a comment. You can login here.


More Stuff

 This site and its contents are Copyright 1999-2004 by IISFAQ Microsoft Corporation in no way endorses or is affiliated with IISFAQ