Retaining mail

The aox retain mail command inserts or updates a mail retention policy. Users will not be able to delete mail if it matches the policy.

Each policy has a duration, and optionally a mailbox to which it applies and/or a search specification.

If it applies to a mailbox, it also applies to all children of that mailbox. If you specify a search, then the policy applies only to messages that match that search, otherwise it applies to all messages.

The simplest policy is one that matches all messages:

aox retain mail 7

A little more complex is one that matches all messages in certain mailboxes, such as this, which preserves mail forever in the mailboxes /archive/this, /archive/that, etc.

aox retain mail forever /archive

It is also possible to specify a search. This preserves all mail from/to/… exemplo.com.br for 14 days:

aox retain mail 14 address exemplo.com.br

The last example has both a mailbox and a search:

aox retain mail 90 /archive/sales address exemplo.com.br

The syntax used for the search is the same as for aox show search and aox delete mail. (The show search command is a convenient way to experiment with search syntax.)

In case of questions, please write to info@aox.org.

Relevant links

About this page

Last modified: 2010-11-19
Location: aox.org/aox/retainmessages