cyr_expire - expire messages and duplicate delivery database entries
[ -C config-file
] [ -D
] [ -E expire-duration
] [ -X
] [ -p mailbox-prefix
] [ -u
] [ -t
] [ -v
is used to run a number of regular maintenance tasks on Cyrus
- expire messages from mailboxes, and
- expire entries from the duplicate delivery database,
- cleanse mailboxes of partially expunged messages (when
using the "delayed" expunge mode), and
- remove deleted mailboxes (when using the
"delayed" delete mode).
The expiration of messages is controlled by the
mailbox annotation which specifies the
age (in days) of messages in the given mailbox that should be deleted. A value
of 0 means that no expiration is to be performed on that mailbox.
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
on it (or does not inherit one), then no messages are expired from the
The annotation can be examined using the info
, and modified using the mboxconfig
commands of cyradm(1p)
Expiration of duplicate delivery database entries for a given mailbox is also
controlled by the /vendor/cmu/cyrus-imapd/expire
applies to 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
reads its configuration options out of the
(5) file unless specified otherwise by -C
requires at least one of -D -E -X
to be supplied.
- -C config-file
- Read configuration options from config-file.
- -D delete-duration
- Remove previously deleted mailboxes older than
delete-duration (when using the "delayed" delete mode).
The value can be a floating point number, and may have a suffix to specify
the unit of time. If no suffix, the value is number of days. Valid
suffixes are d (days), h (hours), m (minutes) and
- -E expire-duration
- Prune the duplicate database of entries older than
expire-duration. This value is only used for entries which do not
have a corresponding /vendor/cmu/cyrus-imapd/expire mailbox
annotation. Format is the same as delete-duration.
- -X expunge-duration
- Expunge previously deleted messages older than
expunge-duration (when using the "delayed" expunge mode).
Format is the same as delete-duration.
- Do not expunge messages even if using delayed expunge mode.
This reduces IO traffic considerably, allowing cyr_expire to be run
frequently to clean up the duplicate database without overloading the
- -p mailbox-prefix
- Only find mailboxes starting with this prefix, e.g.
- -u userid
- Only find mailboxes belonging to this user, e.g.
- Remove any user flags which are not used by remaining (not
- Enable verbose output.
- Skip the annotation lookup, so all
/vendor/cmu/cyrus-imapd/expire annotations are ignored entirely. It
behaves as if they were not set, so only expire-days is considered
for all mailboxes.