How to clear exchange queue when there are hundreds or thousands of spam messages
Microsoft provide no easy way from within Exchange System manager to clear large numbers of spam emails in multiple queues.
Currently you have to find the message in each queue, and delete them queue by queue. If you have thousands of spam messages this is totally impractical.
There were security flaws in exchange service pack 1 and on a few sites I have found this has been exploited and thousands of spam messages have been getting sent through the server, meaning the server gets black listed and starts getting bouncebacks, as well as chewing up the outgoing bandwidth.
To prevent the exploit, stop SMTP and install exchange service pack 2 from here
After you have loaded the service pack follow these steps
- Create a new spam folder for example in C:\Program Files\Exchsrvr\Mailroot\vsi 1\spam
- With the SMTP service still stopped, move all the messages from the C:\Program Files\Exchsrvr\Mailroot\vsi 1\Queue to the spam folder (in case you need to retrieve a message)
- Restart the SMTP service.
Monitor the queue to make sure no new spams are being added. If messages are still going to the queue check the SMTP relay settings and for viruses on client computers.
There is a utility called aqadmcli.exe that you can download from ftp.microsoft.com/PSS/Tools/Exchange Support Tools/Aqadmcli which apparently does a similar thing. Haven’t tried it, but post a comment if you do.