# multiple file deletion - badmail



## jssch (Nov 27, 2000)

We have a major headache. Email went down this week. Looking into it, we found that we have 400,000 objects in the badmail folder. I am trying to clean it out, but the server is dragging painfully slow. I am only deleting 200 - 500 at a time and most of the files are 1 - 10kb. That hourglass is sticking its tongue out at me, I swear. Is there anyway to help speed this process up? 

We are running Windows Server 2003 Standard x64 edition with 1GB Ram and 3.00 GHz Pentium processor.


----------



## Squashman (Apr 4, 2003)

I have never run Exchange but a quick GOOGLE search found this.
http://support.microsoft.com/kb/867642
http://www.microsoft.com/downloads/...0f-6239-40ad-adda-97863d852ff7&DisplayLang=en

And another tool you should have in your arsenal of utilities.
http://www.solarwinds.com/register/...c=70150000000DsoT&CMP=LEC-PRT-CPUK-Body-EI-DL


----------



## jssch (Nov 27, 2000)

We are not using Exchange, just the service that came with Server 2003 Standard Edition. Would there be similar instructions? I looked on the Windows Server 2003 help and support page, but didnt see anything. I see that I can automatically delete the emails from the badmail folder with a batch file and task scheduler. Just wondering how to get rid of the ones I have now with the files being so many. Once I have them cleared, I will set the batch file up. Can I rename the folder and recreate the original one? Would that at least get our email back up and running?


----------



## Squashman (Apr 4, 2003)

You would think the badmailadmin program would work regardless if it was exchange or the standard smtp server.

But as I was reading a response you got on TechRepublic, it might be a good idea to do what he suggested. Delete them from DOS and do it when the server load is light at night.

We could probably write a batch file to loop thru all the emails a small chunk at a time.

How do you know this is keeping the server from running?


----------



## Mordreneth (Jul 3, 2009)

If memory serves me correct - it's using the SMTP service under IIS.....stop IIS temporarly, which should give you time to clear the folder...


----------



## avisitor (Jul 13, 2008)

You can actually stop the SMTP service without stopping IIS if you want through IIS Manager (inetmgr).

Then I'd run a batch file to delete the messages.


----------

