Message stuck in Microsoft SMTP service Queue

July 28, 2008 at 12:51 pm (Technology, windows) (, )

Recently I ran into a problem where emails that were generated using CDOSys were getting stuck in the Microsoft SMTP service outgoing queue.  If you are having problems with the Microsoft SMTP service, you may have discovered that it is difficult to troubleshoot.  This difficulty is mostly caused by the fact that the service has very little logging available to it.  It is true that you can enable logging via the IIS console, but that logging is minimal at best.  Errors are not recorded very well in that log.

I did spot in the event viewer some interesting entries that were complaining about internal DNS errors that appeared to be coming from the SMTP service.  Upon further research I found that IIS 5.0 running on Windows Server 2000 is not able to make DNS queries via UDP.  IIS is only able to query DNS servers using TCP.  This poses a problem since TCP is usually only used for zone transfers; therefore most DNS servers have TCP blocked and only allow UDP queries.

This will result in the SMTP service being unable to query DNS at all.  In that state SMTP service will initially process mail that is put into the ‘pickup’ directory by CDOSys, and move it into the ‘queue’ directory.  From this directory it is normally processed further and sent to the next MTA.  However, when SMTP service is unable to query DNS it just leaves the message in the queue directory and begins ‘BadMail’ processing.

How can you test to see if this is the issue you are having?  The first step I recommend is using nslookup to verify proper operation of DNS as per the needs of IIS 5.0.  Simply run nslookup from the command line (this can be done on either Windows or Linux), and force it to do all queries using TCP.  While in nslookup enter:

set vc

Now any queries you enter will be done using TCP.  If this fails, try turning off forced TCP and run the query again.  If this works you know that the IIS server cannot make TCP DNS queries to it’s designated DNS server.  You can turn off forced TCP by using this command in nslookup:

set novc

Also there is a useful tool from Microsoft that runs various mail sending steps and can help you in debugging this and other issues with SMTP service.  This tool is called SMTPDiagHere is a good article that shows a little on how to use SMTPDiag.

If you have determined that your mail is getting stuck because of TCP DNS queries being rejected or dropped, there are essentially three options for you to fix this:

  • If your firewall is preventing TCP DNS queries, modify the rules to allow it.
  • If possible, change the configuration of the DNS server to allow TCP queries.
  • Change the IIS server to use a DNS server that is configured to allow TCP queries.

Use the nslookup procedure shown above to determine both that the firewall rules are configured to allow TCP queries AND that the DNS server that you’d like to use is allowing TCP queries.  Once are sure that you have set IIS to query a DNS server that allows TCP queries, simply restart the SMTP service and all mail in Queue should begin to process.

Remember:  On Windows Server 2000, you must reboot the server after you changed the DNS servers for a interface in order for the change to take effect.



  1. ecards said,

    Thank you for this post – The darn SMTP server has been a black box with no easy way to figure it out.

    At least now I’m starting to make headway.

    Stuck in Queue

  2. daniel said,

    thanks for this info! Helped getting an older machine up and running.

  3. Smtp queue | Istudyweb said,

    […] Message stuck in Microsoft SMTP service Queue « Axelilly’s …Jul 28, 2008 … Recently I ran into a problem where emails that were generated using CDOSys were getting stuck in the Microsoft SMTP service outgoing … […]

  4. Sahel said,

    Hello, I’ve followed below video ‘s procedure for same Problem on Windows 2008 R2 64bit SMTP and It was solved both on Real Server and Virtual Machine

  5. Can u take xanax and claritin said,

    My family еvery time saу that I аam killiոg my time here at web, bսt I know
    Ι am gewtting kոoowledge all tɦe time by reading thes nice content.

  6. Johne275 said,

    Today, I went to the beach front with my kids. ecddgdgeaadd

  7. Johna796 said,

    griseofulvin psoriasis bedkkfkefeed

  8. Johng888 said,

    Usually I do not read writeup on blogs, nevertheless I wish to say that this writeup extremely forced me to take a look at and do so! Your writing taste has been amazed me. Thanks, really wonderful post. dkbkdbedkgek

  9. Johnd793 said,

    Several of these games are worth some time and are actually daaaeacdcdff

  10. Douglasdof said,

    Hi there! free trial cialis voucher great web page.

  11. Douglasdof said,

    Hello! free samples cialis very good site.

  12. RichardNat said,

    Hi! pharmacy online very good website.

  13. Stevencok said,

  14. Frankmex said,

    Hello there! viagra 30 day free trial excellent web page.

  15. Antoniopoura said,

    Hi there! mexican online pharmacy reviews very good web site.

  16. Antoniopoura said,

    Hello there! canadapharmacts great site.

  17. Jamesdah said,

    Hello there! order slimex good internet site.

  18. Andrewnearp said,

    Hi! good site to buy viagra online very good web site.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: