Let's start by talking about a mailbox's default folders; these are the folders that are automatically created by the Outlook client the first time the mailbox is accessed. The default folders list can be found under the Managed Default Folders tab in the results pane shown in Figure 12.2.
The Managed Default Folder list is static; you cannot create additional default folders either through the EMC or the EMS. The following is a list of the folders that are considered default folders:
Calendar
Contacts
Deleted Items
Drafts
Entire Mailbox
Inbox
Journal
Junk E-mail
Notes
Outbox
RSS Feeds
Sent Items
Sync Issues
Tasks
Depending on the client version you are using, you may not see all of these folders. For example, if you have never used the Outlook 2007 client against your mailbox, you will not see the Rss Feeds folder in your mailbox.
While we cannot define new default folders, we can manage the content in the existing folders. Managed content settings can be defined for each folder (or the entire mailbox). In many ways, the managed content settings can be used in the same way that the Exchange 2000/2003 Mailbox Manager functions could be used.
When creating a managed content setting, you must define what type of content it will be affecting; this means that you specify the message type. Table 12.1 shows the message types that you can define for managed content settings; this table includes the MessageClass property that would be used when creating managed content settings via the EMS and the New-ManagedContentSettings cmdlet.
Message Type | MessageClass | Explanation |
---|---|---|
All Message Content | * | All content types in the folder |
Calendar Items | IPM.Appointment | Entries found on a calendar |
Contacts | IPM.Contact | Contact items |
Documents | IPM.Document | Message content that has been set as a document |
Faxes | IPM.Note.Microsoft.Fax | Faxes generated by the Exchange 2007 Unified Messaging server role or compatible applications |
Journal Items | IPM.Activity | Journal items |
Meeting Requests, Responses, and Cancellations | IPM.Schedule | Schedule requests, responses to schedule requests, cancellations, etc. |
Missed Calls | IPM.Note.Microsoft.Missed.Voice | Notices of telephone calls missed when using Exchange 2007 Unified Messaging |
Notes | IPM.StickyNote | Note items usually found in the Outlook Notes folder |
Posts | IPM.Post | Post item types |
RSS Items | IPM.Post.RSS | RSS feed data in the Outlook 2007 client RSS Feeds folder |
Tasks | IPM.Task | Task items |
Voice Mail | IPM.Note.Microsoft.Voicemail | Voicemail messages generated by the Exchange 2007 Unified Messaging server or equivalent software |
You can optionally specify a retention period for items that meet the conditions of the message content setting. The retention period is specified in days and the retention period starts from one of two points:
The When Delivered, End Date for Calendar and Recurring Tasks selection allows you to specify that the starting point for the retention cycle is when the message arrives in the mailbox. Alternately, if the item is a calendar entry or recurring task, the retention cycle starts at the end date of the item.
The When Item Is Moved to the Folder selection specifies that the retention date starts when the item is first placed into the folder.
Once the retention period expires, you have to take an action on any items that meet your criteria. Table 12.2 shows a list of the possible actions you can take on an item at the end of the retention period. The table also includes the RetentionAction value that would be used if you were creating managed content settings from the EMS instead of the EMC.
Action | RetentionAction | Explanation |
---|---|---|
Move to the Deleted Items Folder | MoveToDeletedItems | Moves the item to the Deleted Items folder; this setting is not valid if you are trying to create a managed content setting in the Deleted Items folder. |
Move to a Managed Custom Folder | MoveToFolder | Moves the item to a managed custom folder that you specify. |
Delete and Allow Recovery | DeleteAndAllowRecovery | Deletes the item, but allows a user to undelete the item before the item is removed from the deleted item cache. |
Permanently Delete | PermanentlyDelete | Deletes the item and does not allow it to be recovered from the deleted item cache. |
Mark as Past Retention Limit | MarkAsPastRetentionLimit | Marks the item as past the retention limit but takes no further action. At this point, message archival software could take over and archive just the messages that are past their retention limit. |
An additional option you have available when you are creating a managed content setting is to automatically journal a copy of the message to a mailbox or external location. We will look at an example of journaling using the managed content settings.
If you want to use the EMS to see the managed content settings that you have created, here is an example of using the Get-ManagedContentSettings cmdlet:
Get-ManagedContentSettings Name MessageClass ManagedFolderName ---- ------------ ----------------- Message archival * Official Corporate Com... Purge the Deleted Item... * Deleted Items Move items older than ... * Inbox Move items older than ... * Sent Items Move Faxes IPM.Note.Microsoft.Fax* Inbox Move Voice Mail IPM.Note.Microsoft.Voi... Inbox
There are a number of cmdlets that you can use from within the EMS to create or manipulate managed content settings. These are shown in Table 12.3.
Cmdlet | Explanation |
---|---|
New-ManagedContentSettings | Creates a new managed content setting |
Set-ManagedContentSettings | Changes the properties of an existing managed content setting object |
Get-ManagedContentSettings | Retrieves managed content settings |
Remove-ManagedContentSettings | Deletes a managed content setting object |
Let's now look at some practical examples of managed content settings.
One pet peeve of many Exchange administrators we know is that users will delete messages from their Inbox or Sent Items folder, but they never actually empty the Deleted Items folder. It is not uncommon to find hundreds of megabytes of message content in a user's Deleted Items folder. Let's go through an example of a case where we want to ensure that nothing older than 14 days is kept in the Deleted Items folder but make sure the user can recover the deleted message from the deleted item cache after we empty their Deleted Items folder.
To do this through the EMC, locate the Deleted Items folder in the Managed Default Folder list and select it. On the Actions pane, select New Managed Content Settings, which will launch the New Managed Content Settings Wizard (shown in Figure 12.3). On the Introduction screen of the wizard, you specify the name of the managed content settings item, the type of message content it will apply to (in this case, all message content), the length of retention, when the retention period starts, and the action to take.
Figure 12.3: Configuring a managed content setting to delete items that have been in the Deleted Items folder longer than 14 days
If you want to delete an item from a folder after a specified number of days, choose the When Delivered, End Date for Calendar and Recurring Tasks option in the Retention Period (Days) drop-down list. There is a bug in the release to manufacturing (RTM) version of Exchange that may prevent items from being deleted if you choose When Item Is Moved to the Folder option. Undoubtedly this will be corrected in later fixes and service packs, but be aware of this if you are an early adopter.
Since there is not a managed custom folder involved, the option to specify a managed custom folder is not available. Once you click Next, you move to the Journaling page in the wizard, but we do not need anything from that page for this particular managed content setting. The New Managed Content Settings page allows you to review what you are about to configure and then you click New. Like most EMC wizards, the Completion screen will include the EMS command that was actually executed to complete this task. The following is the EMS command that was necessary to define this managed content setting:
New-ManagedContentSettings -Name 'Purge the Deleted Items folder' -FolderName 'Deleted Items' -RetentionAction 'DeleteAndAllowRecovery' -AddressForJournaling $null -AgeLimitForRetention '14.00:00:00' -JournalingEnabled $false -MessageFormatForJournaling 'UseTnef' -RetentionEnabled $true -LabelForJournaling '' -MessageClass '*' -MoveToDestinationFolder $null -TriggerForRetention 'WhenMoved'
Note that while we have defined the managed content setting to this particular folder, it will not yet apply to anyone's mailbox, nor will any server actually enforce this content setting. We will cover the managed folder mailbox policies and scheduling the managed folder assistant later in this chapter.
A good use of managed content settings is to move content to an alternate location. In this example, we will mimic one of the functions of the Exchange 2000/2003 Mailbox Manager. It had the ability to move mail that was nearly ready to be deleted from the system in to a System Cleanup folder. Mail could then be purged from the System Cleanup folder after it had been in that folder for a specified number of days.
In this example, we have already created a managed custom folder. We are going to create a managed content setting that moves all items in the Inbox folder in to the System Cleanup folder. Launch the New Managed Content Settings Wizard in exactly the same way as we did in the previous example except that this time select the Inbox. Specify a retention period of 180 days, specify that the action to take is Move to a Managed Custom Folder, and then select the System Cleanup folder. The Introduction page of the New Managed Content Settings Wizard is shown in Figure 12.4.
Figure 12.4: Moving content from the Inbox to the System Cleanup folder
The resulting EMS command that created this managed content setting is very similar to the one we used to purge the Deleted Items folder:
New-ManagedContentSettings -Name 'Move items older than 180 days to the System Cleanup Folder' -FolderName 'Inbox' -RetentionAction 'MoveToFolder' -AddressForJournaling $null -AgeLimitForRetention '180.00:00:00' -JournalingEnabled $false -MessageFormatForJournaling 'UseTnef' -RetentionEnabled $true -LabelForJournaling '' -MessageClass '*' -MoveToDestinationFolder 'System Cleanup Folder' -TriggerForRetention 'WhenDelivered'
If we now want to move items in the Sent Items folder that are older than 180 days into the System Cleanup folder, we can make a few modifications to the managed content settings. The only one that is required is the -FolderName parameter; its value must be changed to 'Sent Items':
New-ManagedContentSettings -Name 'Move items older than 180 days to the System Cleanup Folder' -FolderName 'Sent Items' -RetentionAction 'MoveToFolder' -AddressForJournaling $null -AgeLimitForRetention '180.00:00:00' -MessageClass '*' -MoveToDestinationFolder 'System Cleanup Folder' -TriggerForRetention 'WhenDelivered'
Since we did not require the journaling settings, we can remove those from the New-ManagedContentSettings command line.