Recipe 7.16. Deleting Messages from the Badmail FolderProblemYou need to delete messages from the badmail folder of your Exchange virtual server. SolutionUsing a graphical user interfaceFirst, run the Badmail Delete and Archival script (BadmailAdminTool) with default parameters:
Next, schedule the BadmailAdminTool script to run with default parameters:
DiscussionWhen Exchange encounters a fatal error during a delivery attempt, it generates an NDR for the original sender and attempts to deliver it. NDRs are messages like any other and work through the same link and queue system. In time, NDRs themselves may prove to be undeliverable. When that happens, Exchange moves the original message to the badmail folder, which is, by default, located underneath the root mail queue folder for the virtual server instance (see Recipe 7.15 for more information on queue folders). Over time, the badmail directory can fill up and eventually cause space issues. You should check this directory on a regular basis and move or delete messages from it. Microsoft provides the BadmailAdminTool for download from their Exchange Tools download web site. It works with both Exchange 2000 and Exchange Server 2003. You can get it at http://www.microsoft.com/downloads/details.aspx?familyid=782aaf0f-6239-40ad-adda-97863d852ff7&displaylang=en. The BadmailAdminTool provides the parameters shown in Table 7-7.
There are other methods of dealing with the badmail folder: The "Dealing with Badmail" entry (http://hellomate.typepad.com/exchange/2003/07/dealing_with_ba.html) on the MS Exchange Blog gives a short description of the badmail folder and provides an alternate script, the Badmail Report Tool. The Badmail Report Tool provides a weekly report of the contents of the badmail folder via email. You can download it from http://hellomate.typepad.com/exchange/badmailreport.zip. As of Exchange Server 2003 SP1, the badmail folder is disabled out of the box, but you can re-enable it with selected registry tweaks per MS KB 884068. See AlsoRecipe 7.15 for more information on queue folders, and MS KB 884068 (The Badmail folder is disabled in Exchange Server 2003 SP1) |