The expire criteria can be set with configutil parameters or in a file called store.expirerule. (See see To Set the Automatic Message Removal (Expire and Purge) Feature in Sun Java System Messaging Server 6.3 Administration Guide for detailed usage information.) The following criteria can be specified:
Age, in days, that messages have been in the mailbox
This criterion dates the age of a message from the time it first arrives in the message store (is first received by the user).
Age, in days, that messages have been saved in a particular mailbox folder
This criterion dates the age of a message from the time it is moved to a particular folder or re-saved in a folder.
Size of message and grace period (days that a message exceeding the size limit will remain in the message store before removal)
Whether a message has been flagged as seen or deleted
By message header field such as subject or message ID
According to a sieve script, as defined in RFC 3028
You can use imexpire to install a local expire rule file (store.expirerule) without conflicting with existing expire rules. If an expire rule file configured for the same partition or mailbox is executing while you try to install a new expire rule file, a warning message appears and the new expire rule file is not installed. Use the imexpire -i option to install a local expire rule file.
You can exclude a particular user or mailbox folder from all expire criteria by setting the exclusive expire rule for that user or mailbox without specifying any other rules in the expire rule file.
The functionality of imexpire has been expanded and the interface has changed since earlier versions of Messaging Server. However, this version continues to support older imexpire configurations.