Every Exchange Server administrator will eventually have to deal with an SMTP queue that's choked with messages.
Sometimes an SMTP queue can be flooded by thousands of non-delivery reports (NDRs) due to spam; and sometimes it can be caused by undeliverable email that has been mistakenly auto-generated.
Clearing the SMTP queue usually involves deleting the files in the queue directory through Windows Explorer or a del *.* command -- but these aren't the only ways to handle the problem.
One way that works directly with Exchange Server instead of through the file system is a command-line utility called AQADMCLI. It sounds like a Roman numeral, but it's actually a tool that Microsoft used to only make available for Exchange Server customers through calls to Product Support Services.
It is freely available for download from Microsoft's FTP site.
To empty out an SMTP queue using AQADMCLI, run it from the command line and type in the following commands:
setserver
delmsg flags=all
quit
If you want to delete messages by specific criteria instead of just dumping everything, the delmsg command can be given specific flags (as the above syntax implies).
For instance, if you type delmsg flags=SENDER,sender=user@site.org, all messages sent by user@site.org will be flagged for deletion.
Run AQADMCLI HELP and you'll get a complete dump of all the available commands and their syntax.
No comments:
Post a Comment