Exchange Server 2003 Mailflow (Part 2) - Troubleshooting

This article shows you how to troubleshoot message flow within the Exchange Organization.
Marc Grote photo

If you would like to read the first part in this article series please go to Exchange Server 2003 Mailflow (Part 1).

This is part two of a two part article. Part one deals with the basics of message delivery and transmitting from Outlook to Exchange and between Exchange Servers. Part two of the article will try to help you with troubleshooting e-mail delivery and message flow.


Get your copy of the German language "Microsoft ISA Server 2004 - Das Handbuch"

Let’s begin

There are several places and tools which can help you find the reason for failed or delayed message delivery. I will go through some basic steps to show you where you should start troubleshooting from. After reading this article and playing with these tools you should be able to troubleshoot e-mail message delivery.

Queues

If you are looking for e-mail messages which were not delivered to their recipients, one of the first places to look to see where the Message has gone is the Queue Viewer. You can find the Queue Viewer in the Exchange System Manager directly under the Server Node.

There are several Queues of interest and you should have a look at the state of the Queues and the number of messages in the Queue. If there are any messages in the Queue, you can select the Queue and you will see more information about possible problems in the info pane. If you right click the Queue you can force a connection if the problem is only temporarily.

Explanation of Queue Types

Here is an explanation of Queue Types from Henrik Walther's article about Exchange 2003 Queue Viewer improvements.

DSN messages pending submission
This folder contains Delivery Status Notifications awaiting delivery. Its primarily used for NDR’s – Non Delivery Reports.

Failed message retry queue
Contains outbound messages which couldn’t be delivered to their destination but will be given another attempt.

Local delivery
Contains inbound messages for delivery to mailboxes on the Exchange server.

Messages awaiting directory lookup
Contains inbound messages awaiting recipient lookup in Active Directory.

Messages pending submission
Contains messages accepted by the SMTP virtual server, but haven’t yet been processed.

Messages queued for deferred delivery
Contains messages queued for deferred delivery (later time).

Messages waiting to be routed
Contains outbound SMTP/X400 messages still waiting to be routed to their destination server, when it has been determined the message will be sent.


Figure 1: Queue Viewer

For Troubleshooting reasons it is also possible to Stop all Outbound Mail if you click the Symbol in the Queue viewer. Please note that in the picture above Outgoing Mail has already been stopped. Outbound e-mail delivery was stopped for the purposes of this article so that some Messages in the Queues can be easily shown.

Message Tracking

One of the fundamental settings that every Exchange Server should have enabled is the Message Tracking option. The Message Tracking option enables the logging of every e-mail message and, if enabled, for the message subject. You should enable message subject tracking only on low utilized Servers. Message subject logging can also be problematic in Data Security, so  please speak with your legal department before implementing this feature.


Figure 2: Enabling Message Tracking

After the Message Tracking feature has been enabled, the Message Tracking Feature can be used in the Exchange System Manager to find messages sent to recipients.


Figure 3: Message Tracking Center

If an e-mail message is selected, the message can be clicked in order to see the message delivery status details.


Figure 4: Message History

As can be seen in the picture above, the message was Submitted from Store, delivered to the AQE, submitted to the Categorizer, Queued for Routing and Queued for Remote Delivery. For an explanation of these terms read the first article about Exchange message flow.

SMTP Logging

With Exchange Server 2003 it is possible to use extended SMTP Logging for troubleshooting purposes. If SMTP Logging is enabled, Exchange will write every outgoing mail through SMTP in a special logfile located by default in \Windows\System32\Logfiles\SMTPSVC1 where SVC1 is the first Virtual SMTP Server.

You must enable this feature in the Exchange System Manager under the potocol container from the Exchange Server object.


Figure 5: SMTP Logging

After enabling this feature, the generated logfile can be opened and the detailed steps are shown in the SMTP connection process.

For better viewing and analyzing, it is possible to export the logfile into Microsoft Excel. With Microsoft Excel the logfile can be formatted so that it is easier to analyze its content.


Figure 6: SMTP Logfile

Diagnostic Logging

One other troubleshooting helper is the Diagnostic Logging of Exchange Server 2003. Diagnostic Logging sets the details that are logged in the Event Viewer for specific Exchange components to a higher level, so more information will be logged in the Event Viewer Application Log .

Diagnostic Logging should only be enabled  when troubleshooting specific problems because Diagnostic Logging quickly fills the Event Log. The Logging Level can be set from None to Maximum in the GUI but there is also a Registry Key for setting the Logging Level to Level 7 for SMTP Logging purposes.

Diagnostic Logging must be enabled in the Exchange System Manager under the Exchange Server object.

After enabling the Diagnostic Logging feature the Event Viewer can be analyzed for specific problems.


Figure 7: Diagnostic Logging

Telnet for SMTP

Telnet is a great tool for analyzing problems with the SMTP Service, especially for Message delivery.

If a Telnet session is started with the Exchange Server's SMTP Port, every step that is necessary to establish a communication with the SMTP Service on Exchange can be seen.

To start a Telnet session with the Exchange Server open a command prompt and enter:

Telnet Server.Domaene.TLD 25

The following picture shows the steps which are necessary to establish an SMTP connection and to send an e-mail.


Figure 8: Telnet for SMTP Tests

For more information about Telnet and SMTP read my article.

SMTPDIAG

SMTPDIAG is a simple Tool for testing the SMTP Message flow from Exchange Servers to outside SMTP or Exchange Servers.

SMTPDIAG can be downloaded from the Microsoft Exchange 2003 Tools Website. After downloading and extracting the SMTPDIAG Tool, open a command prompt and start SMTPDIAG.

SMTPDIAG has a very simple Syntax, as you can see in the picture below.

SMTPDIAG administrator@mwtraders.msft  grotem@it-training-grote.de starts the SMTPDIAG process. SMTPDIAG now checks DNS settings and initiates an SMTP connection to the destination system without sending mail.

SMTPDIAG has only two options.

  • /V = enables Verbose Mode and shows some more details which are hidden in Standard Mode.
  • [-d target DNS] = This parameter is optional. The IP address of the target DNS server can be specified in order to look up remote MX records. This is often configured as an external DNS server in Exchange. An external DNS can be configured at the Exchange virtual server level but not for the Internet Information Services SMTP service.


Figure 9: SMTPDIAG

For more information about SMTPADIAG read my article.

Conclusion

In this article I tried to show you some troubleshooting tips for problems you may have with e-mail delivery in your Exchange Organization and to external recipients. The first part of this article discussed the basics of Message Flow and Delivery within an Exchange Organization.

If you would like to read the first part in this article series please go to Exchange Server 2003 Mailflow (Part 1).

About Marc Grote

Marc Grote photo Marc Grote is an MCSA/MCSE Messaging & Security, an MCTS/MCITP and a Microsoft Certified Trainer and MCLC. He is a freelance IT Trainer and Consultant in the north of Germany near Hanover. He works with Invenate GmbH on special projects. You can find more information about Invenate at ttp://www.invenate.de. He specializes in ISA Server, Exchange, Security for Windows 2000/2003 and Windows Server 2008 designs, migrations and implementations, and Citrix Metaframe implementations. His efforts have earned him recognition as a Microsoft MVP for ISA Server since 2004. You can visit his homepage at http://www.it-training-grote.de.

Click here for Marc Grote's section.

Share this article

Receive all the latest articles by email!

Get all articles delivered directly to your mailbox as and when they are released on MSExchange.org! Choose between receiving instant updates with the Real-Time Article Update, or a monthly summary with the Monthly Article Update. Sign up to the MSExchange.org Monthly Newsletter, written by Exchange MVP Henrik Walther, containing news, the hottest tips, Exchange links of the month and much more. Subscribe today and don't miss a thing!



Receive all the latest articles by email!

Receive Real-Time & Monthly MSExchange.org article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become an MSExchange.org member!

Discuss your Exchange Server issues with thousands of other Exchange experts. Click here to join!

Solution Center

Readers' Choice

Which is your preferred Exchange Fax Connector solution?