Deleting auto-generated spam from the outbound queue

Please let others know how useful this tip is via the rating scale at the end of it. Do you have a useful Exchange or Outlook tip, timesaver or workaround to share? Submit it to our tip contest and you could win

    Requires Free Membership to View

a prize.

Picture this: One afternoon, you're bombarded with pleas for help from people who've been trying to send mail all day. You check the outbound SMTP queue and -- to your horror -- find hundreds, if not thousands of identical messages.

Maybe they've been generated by some piece of malware that somehow slipped through your company's defenses, and is now trying to spam the outside world; or maybe one of your users has stupidly tried to e-mail the same 2 MB attachment to a whole slew of SMTP-only users!

The obvious way to deal with this is to stop the SMTP service and flush the queue. But what if there are other messages that legitimately need to be delivered?

There is a way to delete only the offending messages -- without using any third-party tools:

  1. Open one of the offending messages and look for a couple of keywords or phrases that should distinguish it from other mail in the queue.

  2. Stop the SMTP service on the Exchange server.

  3. Open the directory that contains the SMTP queues if you haven't already. Usually this is the folder C:\Program Files\Exchsrvr\Mailroot\VSI 1\Queue.

  4. Right-click on the Queue folder and select Search.

  5. In the search window's Word or phrase in the file field, enter the phrase you're using to filter out the message in question.

  6. Search for the matching messages.

  7. Remove them from the queue. You don't have to delete them; they can simply be moved to another folder in the event another message that shouldn't be deleted has been trapped.

  8. Restart the SMTP service and let the messages spool normally.

Since SMTP-queued messages are plain text, they can be read by being dropped into Notepad or another plain text reader.

Note that some automatic spam uses randomly-generated texts to make them more difficult to filter out. However, if they're trying to propagate by sending an attachment, odds are you should be able to filter by searching for the first dozen or so characters in the encoded version of the attachment.

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:

  • Learning Center: The spamfighter's toolbox
  • Reference Center: Spam prevention and management

    This was first published in November 2005

  • 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.