AQADMCLI: Command-line SMTP queue management for Exchange Server

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

    Requires Free Membership to View

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.

SearchExchange.com contributor Brien M. Posey mentioned AQADMCLI a couple of years ago in his tip, "Stay above the SMTP queue floods". But back then, it was only available as a PSS support-call utility. Now 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 <servername>
delmsg flags=all

<servername> is, of course, the name of the Exchange server containing the queue you want to manage.

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.

About the author: Serdar Yegulalp is editor of the Windows Power Users Newsletter.

Do you have comments on this tip? Let us know.

Related information from SearchExchange.com:

  • Tip: Deleting auto-generated spam from the outbound queue
  • Tip: Disk performance best practices for MTA and SMTP queues
  • Tip: SMTP service tuning
  • Tip: Excessive Exchange Server NDRs destroy DNS
  • Learning Guide: How to fight spam on Exchange Server
  • Reference Center: SMTP tips and resources

    Please let others know how useful this tip was via the rating scale below. Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to SearchExchange.com. If we publish it, we'll send you a nifty thank-you gift.

    This was first published in September 2006

  • There are Comments. Add yours.

    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    REGISTER or login:

    Forgot Password?
    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
    Sort by: OldestNewest

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to:

    Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.