Store.expirerule files

files
The use of  files (rather than Message Store   options) is the preferred way to configure message expiration rules for the Message Store.

Multiple  files may be configured, each located in  the directory that pertains to the scope of the expiration rules. That is, rules that apply globally to the entire Message Store are located in one directory, rules that apply to a particular partition are located in a directory for that partition, while rules that apply to specific users are located in user-specific directories, which may be further scoped as applying only to a particular folder of that user. (This feature of scoped expiration rules is one of the benefits of using  files, rather than Message Store   options, as such options are inherently global  and apply to the whole Message Store.)



 The global message expiration rules are stored in the    file. (Note that each global rule will be checked against every user&#x27;s every folder, potentially resulting in noticeable processing overhead depending upon the number of global rules and the number of users and folders.   Therefore, in general, avoid putting any more expiration rules than necessary in this file; in particular, do not put partition, user, or folder rules in this global rules file.) 



Partition message expiration rules are stored in the directory location specified by the corresponding partition&#x27;s     value, so typically     



User message expiration rules are stored as a:     file. Alternatively, user message expiration rules may be stored in a partition   file, but defined to apply to a user via the file&#x27;s setting of a  ruleset   attribute to a value   





Folder-specific message expiration rules are stored as a:     file. Alternatively, user message expiration rules may be stored in a partition    file, but defined to apply  only to a folder via the file&#x27;s setting of a  ruleset   attribute to a value   





It is also possible to exclude specified users from the expiration rules via use of a  file, located in the    directory. (For instance, an administrator, postmaster, or  archival address might be exempted from message expiration via this mechanism.)  The format of the file is line oriented; the user ID of each user to be exempted from message expiration should be listed, one user ID per line of the file.

When  runs, it will create one thread per partition; each partition thread will go through the list of user folders under its assigned partition, loading the relevantly scoped    files as it goes. It checks each folder against the expiration rules applicable to that folder, and expunge messages as needed.

See also:
 * store.expirerule file rulesets
 * Message Store expirerule options
 * Partition options
 * path Option
 * Postmaster addresses
 * The Message Store
 * Message expiration