CYR_EXPIRE(8)
CYR_EXPIRE(8) π
ok bestie, this is the manual page for cyr_expire, from the Cyrus IMAP docs. it's giving "boring sysadmin chore" but it's actually the little cleanup fairy of your mail server and we're gonna be obsessed with it. π§β¨
π NAME π
cyr_expire β Cyrus IMAP documentation
Expire 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-prefix ] [ -u username ] [ -t ] [ -v ]
[ -a ] [ -c ] [ -x ]
β¨ DESCRIPTION β¨
so cyr_expire is the girl who comes in and runs a bunch of regular maintenance tasks on your Cyrus databases. specifically, no cap:
- 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.
main character energy honestly. π
there are also various annotations that cyr_expire respects:
/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
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, and 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. (yes, it outranks everything. she's the queen. π)
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. nothing. zero. nada. π¦
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.
π¨ ok important one:cyr_expirerequires at least one of-A-D-E-Xor-tto be supplied. no options, no service. periodt.
π OPTIONS π
-Cconfig-file β use the specified configuration file config-file rather than the defaultimapd.conf(5).-Aarchive-duration,--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. it 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 version 3.0. β
-Ddelete-duration,--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.-Eexpire-duration,--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.-Xexpunge-duration,--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 the conversations feature is enabled.
this feature was introduced in version 3.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. lowkey a lifesaver fr fr. π-pmailbox-prefix,--prefix=mailbox-prefix β only find mailboxes starting with this prefix, e.g."user.justgotspammedlots".-uuserid,--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 π
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. slay. β¨
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. iconic behaviour, honestly. π
π¦ 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
ok that's the whole thing bestie, you ate that π
β¨ this was CYR_EXPIRE(8) from Cyrus IMAP, version 3.12.4, dated Sep 09, 2026 β go forth and expire responsibly, and remember: at least one of -A -D -E -X or -t, or she simply will not run. mwah. πππ¦πΈ
π¦ where this page comes from
- fedora 44: cyrus-imapd 3.12.4-1.fc44 Β· BSD-Attribution-HPND-disclaimer
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms