Article ID: 555408 - Last Review: August 23, 2005 - Revision: 1.0

Service pack installation appears hung if you have too many files in the BADMAIL folder

Author: Kirill Palagin MVP
Expand all | Collapse all

SYMPTOMS

Installation of an Exchange service pack can appear to stop responding with the message "creating registry entries for the SMTP service" displayed.

CAUSE

You have an excessive number of files in the BADMAIL folder, and the SMTP service is enumerating each file on shutdown, which is taking a lot of time.

RESOLUTION

Delete the contents of your BADMAIL folder(s).
 
Do not attempt to delete the files in the BADMAIL folder using graphical user interface tools (like Windows Explorer) because the extremely large number of files in this folder may cause a GUI tool to stop responding while it attempts to sort these files.
 
Instead, perform this operation using the command prompt tools.
 
To get to the command prompt, Click Start, Run, type "cmd", and click OK.
 
To delete the contents of the BADMAIL folder, type:
c:
cd "Program Files\Exchsrvr\Mailroot"
del *.bad /q /s
del *.bdp /q /s
del *.bdr /q /s
replacing c: with the drive letter where your BADMAIL folder is located.
 
Alternatively, under MAILROOT you can find folders named "vsi x" (where x is "1", "2", "3" etc for each of the virtual SMTP servers you have setup) and use the steps above to selectively delete the contents of BADMAIL in each.
 
Be patient - deletion can take minutes, or in extreme cases, even hours.
 
You can confirm that files are being deleted by monitoring the free space on the volume in several ways:
 
-- By opening another command prompt window and issuing a "dir" command (without quotation marks) periodically.
-- With the help of PerfMon by monitoring the Logical Disk object's Free Megabytes counter for the volume where MAILROOT is located.
-- By opening Windows Explorer window and periodically refreshing the view by pressing F5 key on the keyboard.
 

MORE INFORMATION

Exchange Server's SMTP component and IIS SMTP service are both saving information about undeliverable messages and non-delivery reports to files in the BADMAIL folder. For each undeliverable message 3 files are generated and saved.
 
Please see the following KB article for more information about files in BADMAIL folder:
Supported methods to replay outgoing SMTP messages in Exchange 2003 or in Exchange 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;306043
 
If you want Exchange not to save undeliverable messages to BADMAIL see instructions in the following KB articles:
How to automatically delete messages from the Badmail folder in Exchange Server 2003 and in Exchange 2000 Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;867642
The Badmail folder is disabled in Exchange Server 2003 SP1
http://support.microsoft.com/default.aspx?scid=kb;en-us;884068

APPLIES TO
  • Microsoft Exchange Server 2003 Standard Edition
  • Microsoft Exchange 2000 Server Standard Edition
Keywords: 
kbpubmvp kbpubtypecca kbhowto KB555408
Community Solutions ContentCOMMUNITY SOLUTIONS CONTENT DISCLAIMER
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.
 

Article Translations