You may find that you need to periodically purge an Exchange mail store of all its messages. For instance, if an Exchange server has been set up to do performance testing or evaluation of third-party Exchange software, it would be useful to have a methodology to purge all mail in the server in one swoop. In another scenario, you may train people on how to work Exchange server, and the server will need to be emptied periodically.

Four relatively simple ways to do this come to mind:

  • Back up the databases in a blank state and then restore them over the existing mailboxes. In Exchange 2003 this sort of operation is relatively easy, thanks to the presence of the Recovery Storage Group (RSG). The RSG holds restored backups for copying to the appropriate group, so a backup can be restored out of the RSG as needed.

  • Delete and recreate the mailboxes using the Active Directory Users and Computers (ADUC). This has the disadvantage of being overkill -- unless you want to delete the mailboxes wholesale and then recreate them. If you have all the mailboxes in question in a single organizational unit, this can be done relatively quickly. This process could also be automated with a script for further speed.

  • Use an application like

    Requires Free Membership to View

  • Active Folders Content Manager
    to automatically delete messages as needed. This is one way to purge selectively, and can be useful if you find you need to do other selective deletions that aren't really easily constrained through organizational units (OUs) or other standard Exchange mechanisms.

  • The simplest and most direct way: Unmount the database, delete the .EDB and .STM files, and remount the database. When Exchange senses the needed files are missing, it will recreate them. While this is probably the easiest method, it is also the most global and unforgiving.

Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter.

Do you have a useful Exchange tip to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

This was first published in July 2004

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.