CYR_EXPIRE(8) | Cyrus IMAP | CYR_EXPIRE(8) |
cyr_expire - Cyrus IMAP documentation
Expire messages and duplicate delivery database entries
cyr_expire [ -C config-file ] [ -A archive-duration ] [ -D delete-duration ] [ -E expire-duration ] [ -X expunge-duration ] [ -p mailbox-pre‐fix ] [ -u username ] [ -t ] [ -v ] [ -a ] [ -c ] [ -x ]
cyr_expire is used to run a number of regular maintenance tasks on Cyrus databases, specifically:
There are various annotations that cyr_expire respects:
The first three mailbox annotations specify the age of messages in the given mailbox that should be expired/archived/deleted. The age is specified as a duration, the default unit are days. The duration format is defined in imapd.conf(5).
The last mailbox annotation specifies the UNIX epoch time in seconds until which expiring messages or removing deleted mailboxes is blocked. The zero epoch time represents infinity. This annotation has precedence over any of the other annotations or command line flags. It must only be set on the user inbox and applies to all mailboxes of that user.
The value of the /vendor/cmu/cyrus-imapd/expire annotation is inherited by all children of the mailbox on which it is set, so an entire mailbox tree can be configured by setting a single annotation on the root of that tree. If a mailbox does not have a /vendor/cmu/cyrus-imapd/expire annotation set on it (or does not inherit one), then no messages are expired from the mailbox.
The annotation can be examined using the info command of cyradm(8), and modified using the mboxconfig and setinfo commands of cyradm(8).
Expiration of duplicate delivery database entries for a given mailbox is also controlled by the /vendor/cmu/cyrus-imapd/expire annotation which applies to that mailbox. A value of 0 on the annotation means that no expiration is to be performed on that mailbox. Unlike message expiration, if no annotation applies to the mailbox then duplicate database entries are expired using the value given to the -E option.
Expiration of conversations database entries occurs if the conversations option is present in imapd.conf(5). Expiration can be disabled using the -c option. The period used to expire entries is controlled by the conversations_expire_days option in imapd.conf(5).
cyr_expire reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C.
cyr_expire requires at least one of -A -D -E -X or -t to be supplied.
This feature was introduced in version 3.0.
This feature was introduced in version 3.0.
cyr_expire -E 3 -D 60 -X 60
cyr_expire -x -c -A 7d
Archive partition and conversation support was first introduced in Cyrus version 3.0.
/etc/imapd.conf
imapd.conf(5), master(8), cyradm(8)
The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems)
1993–2025, The Cyrus Team
January 22, 2025 | 3.10.1 |