This section sets the guidelines for the store.expirerule file rules.
In earlier Messaging Server releases, expiration rules could be set with configutil parameters store.expirerule.attribute (see configutil Parameters in Sun Java System Messaging Server 6 2005Q4 Administration Reference.) This is still true, but expire rules using header constraints (example: expiring a message with a specific subject line) are not supported. In any case, it is best to use store.expirerule to specify all expiration rules.
Rules are specified in a file called store.expirerule.
Multiple expiration criteria can be specified with the same rule. (Example above.)
Rules can apply to the entire message store (global rules), a partition, a user, or a folder.
The global rules are stored in msg_svr_base/config/store.expirerule
Each global rule will be checked against every mailbox, which can cause some processing overhead depending on the number of global rules you specify. For this reason, you should not specify partition, mailbox or user rules in the global rules file. In general, you should try not to put any more expiration rules than necessary in this file.
Partition rules are stored in store_root/partition/partition_name/store.expirerule.
User rules are specified in store_root/partition/partition_name/userid/store.expirerule or by specifying the folderpattern rule to be user/userid/.*
Folder rules are specified in store_root/partition/partition_name/userid/folder/store.expirerule or by specifying the folderpattern rule to be user/userid/folder
Note that multiple non-global rules (user, folder, partition) using rule_name was only implemented in the Messaging Server 6.2p4 release and later.
Multiple expire rules can be applied to a mailbox at the same time. An expire policy for a mailbox consists of global rules and local rules. Local rules apply to the mailbox under the same directory and all of its sub-folders.
imexpire unifies all of the expiration rules applying to a mailbox, unless there is an exclusive rule specified for this mailbox (see Table 18–8). The resulting rule set represents the most restrictive expiration policy based on all applicable rules. For example, if rule X expires messages such that the maximum message life is 10 days, and rule Y specifies 5 days, the union will be 5 days.
Attribute |
Description (Attribute Value) |
---|---|
Specifies whether or not this is an exclusive rule. If specified as exclusive, only this rule applies to the specified mailbox(s) and all other rules are ignored. If more than one exclusive rule exists, the last exclusive rule loaded will be used. For example, if a global and a local exclusive rule are specified, the local rule will be used. If there is more than one global exclusive rule, the last global rule listed by configutil is used. (1/0) |
|
Specifies the folders affected by this rule. The format must start with a user/, which represents the directory store_root/partition/*/ See Figure 18–4 and Table 18–9. (POSIX regular expression) |
|
Maximum number of messages in a folder. Oldest messages are expunged as additional messages are delivered. (integer) |
|
Maximum size of folder before the oldest messages are expunged when additional messages are delivered. (integer in bytes) |
|
Age of message in days before being expunged. (integer) |
|
Maximum size of message in bytes before it is marked to be expunged. (integer) |
|
Grace period. Days an over-sized message should remain in a folder. (integer) |
|
message header field |
Specifies a header field and string that marks a message for removal. Values are not case-sensitive and regular expressions are not recognized.Example: Rule1.Subject: Get Rich Now! For the header Expires and Expiry-Date, imexpire will remove the message if the date value specified with these header fields is older than the messagedays attribute. If multiple expiration header fields are specified, the earliest expiration date will be used. (string). |
regexp |
Enable UNIX regular expressions in rules creation. (1 or 0). If not specified, IMAP expressions will be used. |
seen is a message status flag set by the system when the user opens a message. If the attribute seen is set to and, then the message must be seen and other criteria must be met before the rule is fulfilled. If the attribute seen is set to or, then the message only needs to be seen or another criteria be met before the rule is fulfilled. (and/or). |
|
deleted is a message status flag set by the system when the user deletes a message. If the attribute deleted is set to and, then the message must be deleted and another criteria must be met before the rule is fulfilled. If the attribute deleted is set to or, then the message only needs to be seen or another criteria be met before the rule is fulfilled. (and/or) |