Home > Microsoft Exchange Tips > Exchange Server Administration Tips > Dealing with undeliverable messages in Exchange Server
Exchange Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

EXCHANGE SERVER ADMINISTRATION TIPS

Dealing with undeliverable messages in Exchange Server


Brien M. Posey
08.09.2005
Rating: -4.27- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Please let others know how useful this tip is via the rating scale at the end of it. Do you have a useful Exchange or Outlook tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize.


In an Exchange environment, messages may go undelivered for any number of reasons. For example, a communications link may be down, or a DNS server may have trouble resolving the recipient's domain. In any case, undeliverable messages can disrupt the flow of communications among your employees, suppliers and clients. Fortunately, you do have some control over how Exchange handles undeliverable messages.

Accessing non-delivery options

In Exchange Server 2003, non delivery options are controlled at the SMTP level virtual server level. To access the non-delivery options:

  1. Open Exchange System Manager and navigate through the console tree to Administrative Groups -> your administrative group -> Servers -> your server -> Protocols -> SMTP -> Default SMTP Virtual Server.

  2. Right click on the Default SMTP Virtual Server and select Properties.

  3. Click on the Delivery tab to view the message's non-delivery options.

By default, if Exchange Server is unable to deliver a message, it will try again in 10 minutes. If Exchange is still unable to deliver a message, it will wait 10 more minutes before making another attempt. If the message is still undeliverable, Exchange perform a third retry.

At that point, if the message hasn't been delivered, Exchange will try to deliver it in 15 minute intervals for the next two days. If the two days go by, and Exchange still hasn't been able to deliver the message, a non-delivery report will be issued.

Microsoft has disabled the BADMAIL directory in Exchange Server 2003 SP1. But previous versions of Exchange would place a copy of the message into the BADMAIL directory as well. The message would sit in the BADMAIL directory indefinitely until so many non-deliverable messages were placed into the BADMAIL directory that the server ran out of disk space.

Modifying non-delivery options

Now that you know how Exchange deals with non deliverable messages, let's look at how you can modify this behavior. As you can see in Figure A, the Default SMTP Virtual Server Properties' Delivery tab allows you to set the timing of the first, second, third and subsequent retries. You can also control the expiration timeout of the message.

Figure A
Figure A

One other field worth mentioning on this tab is the Delay Notification setting. By default, Exchange is configured so that, if the message hasn't been delivered within 12 hours, the sender will receive a message indicating that the message has not yet been delivered, but that there is no need yet to resend. You can change this notification period from 12 hours to anything that fits your needs.

Setting BADMAIL options

I mentioned earlier that, in previous versions of Exchange, the BADMAIL directory acted as a sort of black hole for undeliverable messages. I think Microsoft was wise to disable the BADMAIL directory, because most administrators never use it. But if you do have a need for it, you can use the registry to re-enable it, and to keep it from growing to an unreasonable size.

Before I show you how to set BADMAIL options, remember that editing the registry is dangerous. If you make a mistake you can destroy Windows and/or your applications. So make a full system backup before continuing.

With that said, you can access the BADMAIL settings at HKEY_LOCAL_MACHINE\System\Current Control Set \Services\SMTPSVC\Queuing.

Once there, there are two different registry keys that you need to pay attention to (you will have to create these keys if they don't already exist):

  1. The first key is a DWORD value named MaxBadMailFolderSize.

    This key indicates the KB size that the BADMAIL folder can grow to before older items are discarded. By default, this value is set to 0 in Exchange Server 2003 SP1, which disables the BADMAIL folder. If you would like to restore the BADMAIL folder to its pre-SP1 behavior, and allow unlimited folder growth, change this value to -1. Otherwise, just specify the folder size. For example, a value of 3072 would allow the BADMAIL folder to grow to 3 MB.

  2. The other key that you need to pay attention to is a DWORD value named BadMailSyncPeriod.

    This value tells Exchange how often it needs to check for changes in BADMAIL folder size. If you manually delete items from the BADMAIL folder, Exchange will be unaware that those items are gone until it runs a BADMAIL sync. This value tells Exchange how often that sync should happen.

    The synchronization period is set to 0, which disables it. But you can set this value to -1, if you want, which allows it to behave the way that it did prior to SP1. You can also specify a period of time, in minutes, for a synchronization to occur. If you choose to use the BADMAIL folder, I recommend performing a BADMAIL sync every 10 to 15 minutes.

About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Windows 2000 Server and IIS. Brien has served as the CIO for a nationwide chain of hospitals and was once in charge of IT security for Fort Knox. As a freelance technical writer he has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at http://www.brienposey.com.


Do you have comments on this tip? Let us know.
Related information from SearchExchange.com:

  • Ask the Expert: How to designate NDR recipients
  • Tip: Service Pack 1 makes BADMAIL disappear
  • Reference Center: Non-delivery reports



    Rate this Tip
    To rate tips, you must be a member of SearchExchange.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    Exchange Server Administration Tips
    Why are .PST files a security threat to Exchange Server mailboxes?
    EMS add-on tool generates graphical Exchange Server 2007 reports
    Third-party Exchange Server 2007 backup and restore tools
    Repairing damaged OWA virtual directories in Exchange Server 2003
    Exchange Server 2007 hardware planning for continuous replication
    Benefits of SAN-based storage in Microsoft Exchange Server 2007
    How to generate HTML reports with the Exchange Management Shell (EMS)
    Hosted Exchange Server adoption to infiltrate the enterprise
    Using ActiveSync without a front-end Exchange server
    Use the Exchange Management Shell Set command to block senders

    Microsoft Exchange Server Non-Delivery Reports (NDRs)
    A network connection problem or an offline server prevented delivery of the message
    Third-party tools that modify NDRs for oversized email
    SMTP 550 relay error when sending large attachments
    Not receiving email messages that have file attachments
    How to strip email attachments from Exchange NDR failure notifications
    Exchange Server error message: 'A non-delivery report with a status code of 5.4.0 was generated for recipient'
    How to select the mailbox account that sends Exchange NDRs
    'You do not have permission to send to this recipient' errors
    AQADMCLI: Command-line SMTP queue management for Exchange Server
    Troubleshoot 'Send As' permission errors

    Microsoft Exchange 2000 Server
    Error 1053: Exchange System Attendant service could not start
    Solve server problems with the Exchange Troubleshooting Assistant tool
    Move mailboxes to Exchange 2007 after Windows upgrade
    Third-party tools that modify NDRs for oversized email
    IP address changes for an Exchange 2000 recovery server
    Exchange Server 2003 tips and tricks -- 7 tips in 7 minutes
    How to enable Exchange Server public folder logging
    Deciphering an 0xc103798a Exchange Server setup error code
    Exchange Server error message: 'A non-delivery report with a status code of 5.4.0 was generated for recipient'
    New Exchange Server installation not receiving SMTP or POP3 email
    Microsoft Exchange 2000 Server Research

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    bounce e-mail  (SearchExchange.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

  • HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts