The expire and purge feature allows you to move messages from one folder to another, archive messages, and remove messages from the message store, according to criteria you define in expire rules. You perform these tasks with the imexpire utility.
Because the imexpire utility is run by the administrator, it bypasses quota enforcement.
For information about how to write expire rules and use the imexpire utility, see 20.9 To Set the Automatic Message Removal (Expire and Purge) Feature
You can write expire rules so that messages of different types are expired according to different criteria.
The expire feature is extremely flexible, offering many choices for setting expire criteria. This section describes one example in which text and voice messages are expired according to different criteria.
The example assumes you have configured text and voice message types as follows:
store.messagetype.1 = text/plain store.messagetype.2 = multipart/voice-message
Assume also that the message store is configured to read the Content-Type header field to determine the message type.
TextInbox.folderpattern: user/%/INBOX TextInbox.messageheader.Content-Type: text/plain TextInbox.messagedays: 365 TextInbox.action: fileinto:Archive VoiceInbox.folderpattern: user/%/INBOX VoiceInbox.messageheader.Content-Type: multipart/voice-message VoiceInbox.savedays: 14 VoiceInbox.action: fileinto:OldMail VoiceOldMail.folderpattern: user/%/OldMail VoiceOldMail.messageheader.Content-Type: multipart/voice-message VoiceOldMail.savedays: 30 VoiceOldMail.action: fileinto:Trash Trash.folderpattern: user/%/Trash Trash.savedays: 7 Trash.action: discard
In this example, text messages and voice mail are expired in different ways, and they follow different schedules, as follows:
Text messages are moved from a user's inbox to the user's Archive folder one year after they arrive in the message store.
Voice mail is moved from the inbox to the OldMail folder after two weeks. If the user saves a voice message, the saved date is reset, and the message is moved two weeks after the new date.
Voice mail is moved from the OldMail folder to the Trash folder after 30 days. The user also can save a voice message in the OldMail folder, which postpones the removal of the message for another 30 days after the new saved date.
Messages of all types are discarded seven days after they are moved to the Trash folder.
The expire rules move voice mail to Trash automatically. Text messages are moved to Trash when a user deletes them.
Note: The savedays rule causes a message to be expired the specified number of days after the message is saved. In a typical voice mail system, a user can save voice mail on the voice mail menu. For text messages, a message is saved when it is moved to a folder. The messagedays rule causes a message to be expired the specified number of days after it first arrives in the message store, no matter which folder it is stored in or how often it is moved.