CYR_EXPIRE(8)
π¦ NAME π¦
okay bestie, meet cyr_expire β it lives in section 8 of the Cyrus IMAP docs π
It expires messages and duplicate delivery database entries. that's the whole vibe. β¨
πΈ SYNOPSIS πΈ
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 ]
π DESCRIPTION π
so cyr_expire is the girl who does all the regular maintenance tasks on Cyrus databases. she's literally the backbone of the operation. here's her to-do list:
- expire messages from mailboxes, and
- expire entries from the duplicate delivery database, and
- cleanse mailboxes of partially expunged messages (when using the
"delayed"expunge mode), and - remove deleted mailboxes (when using the
"delayed"delete mode), and - expire entries from conversations databases, and
- archive messages from mailbox.
she's booked and busy, periodt. π₯
π the annotations she respects π
there are various annotations that cyr_expire respects, and yes, you should respect them too:
/vendor/cmu/cyrus-imapd/expirewhich controls the expirations of messages/vendor/cmu/cyrus-imapd/archivewhich controls the archival of messages/vendor/cmu/cyrus-imapd/deletewhich controls the deletion of messages/vendor/cmu/cyrus-imapd/noexpire_untilwhich disables the expire and delete operations per user
π durations, bestie π
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).
β³ noexpire_until β³
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.
π«Ά yes β zero epoch time = infinity. she said "never" and she meant it.
𧬠inheritance, because family π³
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).
π― duplicate delivery database tea π―
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.
π¬ conversations πΈ
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.
β οΈ heads up bestie:cyr_expirerequires at least one of-A-D-E-Xor-tto be supplied.
β¨ OPTIONS β¨
-Cconfig-file β Use the specified configuration file config-file rather than the defaultimapd.conf(5).-A,--archive-duration=archive-duration β Archive non-flagged messages older than archive-duration to the archive partition, allowing mailbox messages to be split between fast storage and slow large storage. Only does anything ifarchivepartition-*has been set in your config. This value is only used for entries which do not have a corresponding/vendonr/cmu/cyrus-imapd/archivemailbox annotation. The duration format is defined inimapd.conf(5). The default unit are days. This feature was introduced in version3.0. π«-D,--delete-duration=delete-duration β Remove previously deleted mailboxes older than delete-duration (when using the"delayed"delete mode). This value is only used for entries which do not have a corresponding/verdor/cmu/cyrus-imapd/deletemailbox annotation. The duration format is defined inimapd.conf(5). The default unit are days.-E,--expire-duration=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/expiremailbox annotation. The duration format is defined inimapd.conf(5). The default unit are days.-X,--expunge-duration=expunge-duration β Expunge previously deleted messages older than expunge-duration (when using the"delayed"expunge mode). The duration format is defined inimapd.conf(5). The default unit are days.-c,--no-conversationsβ Do not expire conversation database entries, even if theconversationsfeature is enabled. This feature was introduced in version3.0. π«-x,--no-expungeβ Do not expunge messages even if using delayed expunge mode. This reduces IO traffic considerably, allowingcyr_expireto be run frequently to clean up the duplicate database without overloading the machine.-p,--prefix=mailbox-prefix β Only find mailboxes starting with this prefix, e.g."user.justgotspammedlots".-u,--userid=userid β Only find mailboxes belonging to this user, e.g."βjustgotspammedlots@example.com".-t,--prune-userflagsβ Remove any user flags which are not used by remaining (not expunged) messages.-v,--verboseβ Enable verbose output.-a,--ignore-annotationsβ Skip the annotation lookup, so all/vendor/cmu/cyrus-imapd/expireannotations are ignored entirely. It behaves as if they were not set, so onlyexpire-daysis considered for all mailboxes.
π EXAMPLES π
here's the group chat receipts, bestie:
cyr_expire -E 3 -D 60 -X 60
Purge duplicates database of all entries older than 3 days, remove deleted mailboxes older than 60 days and deleted messages older than 60 days.
cyr_expire -x -c -A 7d
Perform migration of message older than 7 days to Archive partition whilst not altering conversation database nor expunging messages.
π HISTORY π
Archive partition and conversation support was first introduced in Cyrus version 3.0.
π FILES π
/etc/imapd.conf
π SEE ALSO π
imapd.conf(5), master(8), cyradm(8)
π AUTHOR π
The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems)
π COPYRIGHT π
1993β2026, The Cyrus Team
and that's the whole page, no cap. this fine piece of documentation is from Cyrus IMAP version 3.12.3, dated Jul 15, 2026 β mwah, slay, go forth and expire responsibly πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: cyrus-common 3.12.3-3build1 Β· CMU
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms