Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


Author: Kirill Palagin MVP

View products that this article applies to.

Symptoms

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

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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

↑ Back to the top


Community 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.

↑ Back to the top


Keywords: KB555408, kbhowto, kbpubtypecca, kbpubmvp

↑ Back to the top

Article Info
Article ID : 555408
Revision : 1
Created on : 8/23/2005
Published on : 8/23/2005
Exists online : False
Views : 251