As we all know SP1 disabled the BadMail folder in Exchange 2003, but for those Exchange 2000 administrators, this may still be a weekly task. Here is a script to execute the Microsoft clean utility.. Use at your own risk.

Script Name: BadMail CleanUp
Script Description: Use the badmail deletion and archival script to schedule the automatic deletion or archival of files in the Badmail directory of specified Simple Mail Transfer Protocol (SMTP) virtual servers on Microsoft® Exchange 2000 or Exchange 2003 servers, or clusters running on Microsoft Windows 2000 Server or Microsoft®
Windows Serverâ„¢ 2003. With this script, you can ensure that the size of the Badmail directory does not exceed specific size limits. This eliminates the administrative overhead of manually archiving or deleting these files.
It is recommended that this script be run as a scheduled event at non-peak usage hours, when mail flow and network traffic is low.

IF True
Write File
Parameter 1 : c:\temp\badmailadmin.wsf
Parameter 2 : VSASharedFiles.badmailadmin.wsf
OS Type : 1
Execute File
Parameter 1 : %windir%\system32\cscript.exe
Parameter 2 : c:\temp\badmailadmin.wsf –a delete –v all –f oldest-l events –m 100
Parameter 3 : 2
OS Type : 1

Legacy Forum Name: Exchange 2000 BadMail CleanUp,
Legacy Posted By Username: cberger