Microsoft Exchange Server 2003 – Controlling BadMail

Introduction to Exchange 2003 Server – BadMail

Have you ever been to the BadMail folder? What is your attitude to this folder, leave well alone or sift through those NDRs? The latest thinking is to disable BadMail all together. Exchange 2003 SP1 makes a significant change to Badmail behaviour.

Topics for Controlling BadMail

 ♠

What is BadMailExchange 2003 Badmail folder.  Exchsrvr Mailroot

What is this BadMail?  Let us start with NDRs (Non-deliverable requests).  These NDR emails cannot be returned to the sender.  So what happens is that after the allotted retries, Exchange 2003 routes the email to a bin called the BadMail folder.

Next, let us find the BadMail folder.  Navigate to \Exchsrvr\Mailroot, now you should see a \vsi 1\BadMail folder.  There will be one vsi folder for each virtual server.  (See diagram opposite.)

Exchange 2003 SP1 and BadMail

Although the Administrator should check the BadMail folder regularly, most don’t.  So when you install Exchange 2003 SP1, messages are no longer written to the Badmail folder. The idea is to prevent the Badmail folder from filling up with messages.  

Registry Entries to Control BadMail

Once you install Exchange 2003 SP1, messages are no longer sent to the BadMail folder.  The thinking is that no-one ever looks at the BadMail, so you may as well delete undeliverable email straight away.   Rumour has it that SP1 sets the MaxBadMailFolderSize in the registry to 0 (Zero).  To complete the configuration SP1 also sets BadMailSyncPeriod  0.

To tell the truth I could not find these settings in my registry.  But I read an article explaining where you can add the MaxBadMailFolderSize and BadMailSyncPeriod entries to the registry.

Navigate to HKLM\System\CurrentControlSet\ Services\SMTPSVC\Queuing
From the Edit menu, select New, DWORD Value (Not string value).  Type MaxBadMailFolderSize, Double-click MaxBadMailFolderSize, type your size for the BadMail folder in kilobytes (KB), click Decimal, rather than Hex.

Repeat the procedure for BadMailSyncPeriod, again create a DWORD not a string.  Set the time in minutes for the local BadMail cache to synchronize with the BadMail folder on the hard drive.

Note: Restart the SMTP service for your new BadMail settings to take effect.

Exchange Monitor from SolarWindsGuy Recommends: The SolarWinds Exchange Monitor

Here is a free tool to monitor your Exchange Server.  Download and install the utility, then inspect your mail queues, monitor the Exchange server’s memory, confirm there is enough disk space and check the CPU utilization.

This is the real deal – there is no catch.  SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.

Free Download of SolarWinds Exchange Monitor

BadMailAdmin Utility

Microsoft provide a utility called BadMailAdmin.exe which can automatically delete, or archive messages in the BadMail folder.  If you are interested here is a download for BadMailAdmin

MadMail Exchange 2003 tip.  Mailroot, Exchsrvr  Run BadMailAdmin as a scheduled task to reduce administration.

Summary

Give the BadMail folder some thought.  Make a decision whether to disable BadMail, or schedule regular deletions.  Alternatively apply Exchange 2003’s SP1 and disable the BadMail folder.

See Also

If you like this page then please share it with your friends