Automatic message removal rules are set by specifying rules in a store.expirerule file. The store.expirerule file contains one expire criteria per line. An expire criteria of the global rule configuration file (msg-svr-base/data/store/store.expirerule) has the following format:
rule_name.attribute: value
An expiration rule for a user or mailbox rule configuration file has this format:
attribute: value
Example 20–4 shows a set of global expiration rules in msg-svr-base/config/store.expirerule.
Rule 1 sets the global expiration policy (that is, policy that applies to all messages), as follows:
Enable UNIX regular expressions in rules creation.
Removes messages larger than 100,000 bytes after 3 days.
Removes messages deleted by the user.
Removes any message with the strings “Vigara Now!” or “XXX Porn!” in the Subject: header.
Limits all folders to 1,000 messages. After 1,000 messages, the system removes the oldest messages on a folder to keep the total to 1,000.
Removes all messages older than 365 days.
Rule 2 sets the automatic message removal policy for users at the hosted domain siroe.com. It limits mailbox sizes to 1 megabyte, removes messages that have been deleted, and removes messages older than 14 days.
Rule 3 sets the automatic message removal policy for messages in the inbox folder of user f.dostoevski. It removes messages with a subject line having the expression “On-line Casino.”
Rule1.regexp: 1 Rule1.folderpattern: user/.* Rule1.messagesize: 100000 Rule1.messagesizedays: 3 Rule1.deleted: or Rule1.Subject: Vigara Now! Rule1.Subject: XXX Porn! Rule1.messagecount: 1000 Rule1.messagedays: 365 Rule2.regexp: 1 Rule2.folderpattern: user/.*@siroe.com/.* Rule2.exclusive: 1 Rule2.deleted: or Rule2.messagedays: 14 Rule2.messagecount: 1000 Rule3.folderpattern: user/f.dostoevski/inbox Rule3.Subject: *On-line Casino* |