The first task is cleaning up deleted mailboxes. When an administrator deletes
a mailbox, the mailbox is retained within the Exchange database for a default
period of 30 days. When the retention period expires, the Clean Up Deleted Mailboxes
maintenance task purges the deleted mailbox from the IS. This process differs
from regular deleted item retention in that we're talking about entire deleted
mailboxes rather than just deleted messages. A separate maintenance task deletes
expired messages.
You set the retention period for deleted mailboxes within Active Directory
(AD). To do so, open the ADSI Edit utility, which is included in the Windows
Server 2003 Support Tools. Navigate through the console tree to Configuration,
Configuration for the domain containing the Exchange Server, Services,
Microsoft Exchange, Exchange organization, Administrative Groups, your
administrative group, Servers, your Exchange Server, Information
Store, and select the storage group (SG) containing the store that you want
to work with.
When you select the appropriate SG, you'll see the stores within that SG in
the column to the right. Right-click the store whose properties you want to
modify, and select Properties to view the store object's attributes. Locate
the msExchMailboxRetentionPeriod attribute, as Figure
4 shows, and use the Edit button to assign a new retention period (in seconds)
for the store. The default value is 2,592,000, or 30 days.
Removing Expired Messages from the Dumpster
When a user deletes a message, Exchange doesn't actually delete the message.
Instead, the client sets the ptaMsgDeleted flag to indicate that the client
should treat the message as being deleted and not display the message.
What happens next depends on whether the client has the Deleted Items Retention
(aka dumpster) functionality enabled. If the dumpster isn't enabled, the deleted
messages will be permanently deleted the next time that the remove expired
messages from the dumpster maintenance task runs. If the dumpster is enabled,
a retention period is assigned to each deleted message, and the remove expired
message from the dumpster maintenance task will permanently delete the message
only after the retention period has expired.
To set the retention period for deleted messages, open a registry editor and
navigate to the HKEY_LOCAL_MACHINE\SYSTEMCurrentControlSet\Services\MSExchangeIS\servername\
Private-GUID subkey or the HKEY_LOCAL|MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\servername\
Public-GUID subkey and create a REG _DWORD value named Deletion Thread Period.
Assign it a value that reflects the desired retention period (in seconds).
Purging Indexes
Whenever the information within an Exchange Server database is sorted, the Extensible
Storage Engine (ESE) dynamically creates an index for the sorted view. If these
indexes didn't eventually expire, you could potentially end up with thousands
of indexes for each store. To prevent this situation, Exchange assigns each
index an expiration period. In Exchange 2003, indexes expire 40 days after they're
created (eight days in Exchange Server 5.5).
When an index is created, Exchange adds a reference to the index and its expiration
time to an internal table called the index aging table. When Exchange performs
the purge indexes maintenance task, it uses this table to determine which,
if any, indexes have expired and removes them.
AD controls the amount of time that indexes are retained. You can modify this
setting by using ADSI Edit to navigate to Configuration, Configuration for
the domain containing the Exchange server, Services, Microsoft Exchange,
Exchange organization, Administrative Groups, your administrative
group, Servers, your Exchange Server, Information Store. Select the
SG containing the store that you want to work with. Typically, you'll change
this setting only if server resources are a concern.
The attribute that controls the index-retention time is msExchAgingKeepTime.
By default, this value isn't set, but you can set it to the number of seconds
that you want to retain indexes. The reason that the attribute isn't assigned
a default value is because index-retention time was originally controlled through
the registry. You can still control the retention time through the registry,
but the AD attribute supersedes settings made through the registry.
If you want to change the index-retention time by modifying the registry, you
can create the necessary subkey at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem.
There are two different registry subkeys that you can create that will control
index retention. The first is Aging Keep Time (of REG_DWORD type). This subkey
does the same thing that the AD object does. It lets you set the number of seconds
that indexes are retained. By default, indexes in Exchange 2003 are retained
for 40 days.