There are times when you don’t want to delete a mailbox, but you do want to remove some or all of the messages from it. In this Daily Feature, I’ll show you how to clear messages from your Exchange mailboxes using the Exchange Administrator’s Clean utility.

When to use the Clean utility
The Clean utility comes in handy if you have generic mailboxes that you assign to temporary employees. When the employee leaves, you can simply remove all messages from the mailbox, change the user password, and you are ready to assign the mailbox to the next temp employee. Another situation where you might need to clean out mailboxes is if you have a computer lab with mailboxes for training purposes. Once the training session is over, you can quickly and easily delete the unwanted mail messages without having to log on to each computer.

Author’s Note

Use caution with the Clean utility. There is no easy way to restore messages removed by it. Make sure you have a complete backup of your message store before using the Clean utility on it.

Using the Clean utility
To use the Clean utility, you’ll need Exchange Administrator permissions. Open the Exchange Administrator program, choose a mailbox to be cleaned from the Recipient’s container, and select Clean from the Tools menu.

If you haven’t applied Service Pack 3 or 4 for Microsoft Exchange 5.5 to your Exchange Administrator client, you’ll see the screen shown in Figure A. Your options for cleaning mailboxes will be fewer than if you’ve applied the latest service packs.

Figure A
The Clean utility has fewer options if you’re not running Exchange 5.5 Service Pack 3 or 4.

Without Service Pack 3 or 4 installed, you can choose to delete based only on age, sensitivity, or read criteria. You may choose to delete the items permanently or move them to the Deleted box. On Exchange 5.5 running without Service Pack 3, the Outlook client stores Contact and Calendar information as message files. The utility doesn’t differentiate between special folder messages and normal mail messages. This will cause all messages to be deleted based on the criteria you specify.

When you run Exchange 5.5 with Service Pack 3 or 4 installed, you will benefit from additional options when using the Clean utility, as shown in Figure B.

Figure B
Exchange 5.5 running Service Pack 3 or later gives you additional cleaning options.

These additional features include the ability to remove messages based on Last Date Modified or Received Date. It also adds a Default Types section that allows you to differentiate between special folders and the Inbox.

Issues with AutoArchive
The Clean utility determines the message age based on the MAPI property PR_MESSAGE_DELIVERY_TIME, which is the date the message was received. Outlook AutoArchive determines message age based on the MAPI property PR_LAST_MODIFICATION_TIME, which is the date the message was last modified. This can result in a problem for AutoArchive. When you move or change an Outlook message, you update the Modified date attribute that is used by the archive program. Moved messages do not appear to be as old to the archive program as they appeared before the move and may not be archived as soon as expected.

Note, if you AutoArchive messages once they reach a certain age and you delete messages using the Clean Mailbox utility, some messages may be deleted that have not yet been AutoArchived because the last modification date may be changed.

The Clean utility is easy to use. It allows you to remove messages from users’ mailboxes without having to assign yourself permissions to them or without having to log in to each mailbox. If you need to quickly reassign e-mail accounts or need a way to free up disk space on your Exchange server, you’ll find this to be a very valuable utility.