retention_policies governs when mail may be and must be deleted. Each row contains one policy.
The action is either retain or delete. If retain, then the selected mail cannot be deleted for the specified duration. If delete, then the selected mail is automatically deleted after the specified duration.
The duration is a number of days. Archiveopteryx adds it to messages.idate to determine whether a particular message is covered by a particular policy.
The mailbox is the top-level mailbox to which this policy applies. If mailbox points to /users/nirmala/old, then …/old as well as its children …/old/this and …/old/that are all covered by this policy.
The selector specifies which messages this policy covers, or is null in case it applies to all messages in that mailbox/those mailboxes. The format used is internal and (regrettably) undocumented.
retention_policies is checked when IMAP or POP users try to delete mail. You can override it using direct database access.
Delete policies are executed by aox vacuum.
create table retention_policies ( id serial primary key, action text not null, mailbox integer references mailboxes(id), duration integer not null, selector text, constraint rp_action check (action in ('retain','delete')) );
The retention_policies table was introduced in version 3.1.0.
In case of questions, please write to firstname.lastname@example.org.
Last modified: 2010-11-19