• subscribe
August 27, 2003 12:00 AM

Clearing a Blocked Exchange SMTP Message Queue

Windows IT Pro
InstantDoc ID #39651

I'm having a major problem with our Microsoft Exchange 2000 Server system. As of last night, the Exchange server suddenly stopped delivering incoming and outgoing messages. Outgoing messages leave users' Outboxes and appear to transmit fine but are never received by recipients (even when sent to the sending user's own mailbox). Incoming messages from external senders don't bounce and seem to be received by the server but never show up in our users' Inboxes. Where are the messages going, and what can I do to straighten out the situation?

The problem you describe is all too familiar to me. The cause is most likely a stuck message in the SMTP queue folder. The Exchange server's Message Transfer Agent (MTA) occasionally (and for reasons unbeknownst to me and not adequately described anywhere by Microsoft) chokes on a message and ends up spinning its metaphorical wheels. Theoretically, Exchange should be able to deal with bad messages in a more graceful manner but unfortunately fails to do so in some cases.

To test for and resolve this situation, first navigate to the SMTP queue folder on your Exchange server (typically the C:\program files\exchsrvr\mailroot\vsi 1\queue folder—vsi 1 stands for SMTP virtual server instance 1—unless you have multiple SMTP virtual server instances on the server). As Figure 1 shows, this folder will probably contain several files beginning with NTFS and ending in an .eml extension (which stands for—you guessed it—email). These files are queued SMTP messages that the Exchange server needs to process. One of the messages—in most cases, the oldest one—is probably causing the difficulty. By using Windows Explorer's Detail View to view the folder, you can determine the order in which Exchange is processing messages. The first message awaiting processing (i.e., the message with the earliest date and time) is the most likely culprit. If the machine you use to view the queue folder is running Microsoft Outlook or Outlook Express, you can use either program to view the content of the queued messages; otherwise, you can use Notepad or a text editor.

The next step is to delete the message from the queue. First, make a backup copy of the message in case it isn't the culprit. Second, stop the Exchange services on the server, or the system likely will report the file as being in use when you attempt to delete it. Exchange System Manager (ESM) provides a way to delete individual messages from the queue (as the Microsoft article "How to Delete Messages from Queues in Exchange 2000 Server" explains). However, I typically use the Windows Explorer method I just described to identify and delete the offending message because Windows Explorer's Detail view lets you observe each file's date and timestamp, making identifying the oldest file easy. Also, you can easily see and open the message—in my experience, ESM sometimes fails to display the problematic message in this type of situation.

After you successfully delete the message, restart the Exchange services. At this point, Exchange should start delivering messages. If it doesn't, you've probably deleted the wrong message. Restore the message you copied, then pick the next-oldest message and try again, repeating the process until you find the message that's causing the problem.

You should always begin any troubleshooting exercise by examining your Exchange server's event logs and researching relevant articles in the Microsoft Knowledge Base to determine whether they apply to your situation. However, in my experience, none of the dozens of Microsoft articles about stuck messages in the SMTP queue have been helpful in the situation you describe; I've needed to take the actions I describe above to free the queue and start messages flowing again.



ARTICLE TOOLS

Comments
  • Doug
    3 years ago
    Feb 23, 2009

    I want to read this article but when I login the webpage goes back to the login screen.
    I am register - Please Help

  • moony
    7 years ago
    Dec 06, 2005

    great but as I'm new to exchange 2000 I can't find the services I should stop, can you give me a hand with this? Thanks

  • moony
    7 years ago
    Dec 06, 2005

    good article, but as I'm new to exchange 2000 I can't find the services I should stop. Can you please give me a hand with this. Thanks !!!

  • jinedin
    8 years ago
    Nov 19, 2004

    Have spent hours trawling the internet for confirmation that I could delete my culprit EML file without adverse effect. Finally someone's confirmed it. Thanks and boo-sucks to Microsoft for completely avoiding any useful information on this problem in their knowledge base.

  • vivekkhare
    8 years ago
    Aug 11, 2004

    Hi ! I tried running the same script on my exchange server however no message got moved to the said folder and queue is still the same. I feel that my exchange is being used by spammers for relaying purpose and that's why I can see huge queues. Could anyone kindly guide me how to track a mail in SMTP queue to know its original sender's IP, username etc. and How can I stop relaying for external world.
    1. In the Defualt virtual server--access-->Relay I have allowed only my LAN to relay and selected Allow all computers which are able to authenticate

    Please advise I am really stuck.

    Vivek

You must log on before posting a comment.

Are you a new visitor? Register Here