1CYR_EXPIRE(8) Cyrus IMAP CYR_EXPIRE(8)
2
3
4
6 cyr_expire - Cyrus IMAP documentation
7
8 Expire messages and duplicate delivery database entries
9
11 cyr_expire [ -C config-file ] [ -A archive-duration ]
12 [ -D delete-duration ] [ -E expire-duration ] [ -X expunge-duration ]
13 [ -p mailbox-pre‐fix ] [ -u username ] [ -t ] [ -v ]
14 [ -a ] [ -c ] [ -x ]
15
17 cyr_expire is used to run a number of regular maintenance tasks on
18 Cyrus databases, specifically:
19
20 · expire messages from mailboxes, and
21
22 · expire entries from the duplicate delivery database, and
23
24 · cleanse mailboxes of partially expunged messages (when using the
25 "delayed" expunge mode), and
26
27 · remove deleted mailboxes (when using the "delayed" delete mode), and
28
29 · expire entries from conversations databases.
30
31 The expiration of messages is controlled by the /ven‐
32 dor/cmu/cyrus-imapd/expire mailbox annotation which specifies the age
33 (in days) of messages in the given mailbox that should be deleted. A
34 value of 0 means that no expiration is to be performed on that mailbox.
35
36 The value of the /vendor/cmu/cyrus-imapd/expire annotation is inherited
37 by all children of the mailbox on which it is set, so an entire mailbox
38 tree can be configured by setting a single annotation on the root of
39 that tree. If a mailbox does not have a /vendor/cmu/cyrus-imapd/expire
40 annotation set on it (or does not inherit one), then no messages are
41 expired from the mailbox.
42
43 The annotation can be examined using the info command of cyradm(8), and
44 modified using the mboxconfig and setinfo commands of cyradm(8).
45
46 Expiration of duplicate delivery database entries for a given mailbox
47 is also controlled by the /vendor/cmu/cyrus-imapd/expire annotation
48 which applies to that mailbox. Unlike message expiration, if no anno‐
49 tation applies to the mailbox then duplicate database entries are
50 expired using the value given to the -E option.
51
52 Expiration of conversations database entries occurs if the conversa‐
53 tions option is present in imapd.conf(5). Expiration can be disabled
54 using the -c option. The period used to expire entries is controlled
55 by the conversations_expire_days option in imapd.conf(5).
56
57 cyr_expire reads its configuration options out of the imapd.conf(5)
58 file unless specified otherwise by -C.
59
60 cyr_expire requires at least one of -A -D -E -X or -t to be supplied.
61
63 -C config-file
64 Use the specified configuration file config-file rather than the
65 default imapd.conf(5).
66
67 -A archive-duration
68 Archive non-flagged messages older than archive-duration to the
69 archive partition, allowing mailbox messages to be split between
70 fast storage and slow large storage. Only does anything if
71 archivepartition-* has been set in your config.
72
73 This feature was introduced in version 3.0.
74
75 -D delete-duration
76 Remove previously deleted mailboxes older than delete-duration
77 (when using the "delayed" delete mode). The value can be a
78 floating point number, and may have a suffix to specify the unit
79 of time. If no suffix, the value is number of days. Valid suf‐
80 fixes are d (days), h (hours), m (minutes) and s (seconds).
81
82 -E expire-duration
83 Prune the duplicate database of entries older than expire-dura‐
84 tion. This value is only used for entries which do not have a
85 corresponding /vendor/cmu/cyrus-imapd/expire mailbox annotation.
86 Format is the same as delete-duration.
87
88 -X expunge-duration
89 Expunge previously deleted messages older than expunge-duration
90 (when using the "delayed" expunge mode). Format is the same as
91 delete-duration.
92
93 -c Do not expire conversation database entries, even if the conver‐
94 sations feature is enabled.
95
96 This feature was introduced in version 3.0.
97
98 -x Do not expunge messages even if using delayed expunge mode.
99 This reduces IO traffic considerably, allowing cyr_expire to be
100 run frequently to clean up the duplicate database without over‐
101 loading the machine.
102
103 -p mailbox-prefix
104 Only find mailboxes starting with this prefix, e.g.
105 "user.justgotspammedlots".
106
107 -u userid
108 Only find mailboxes belonging to this user, e.g. "‐
109 justgotspammedlots@example.com".
110
111 -t Remove any user flags which are not used by remaining (not
112 expunged) messages.
113
114 -v Enable verbose output.
115
116 -a Skip the annotation lookup, so all /ven‐
117 dor/cmu/cyrus-imapd/expire annotations are ignored entirely. It
118 behaves as if they were not set, so only expire-days is consid‐
119 ered for all mailboxes.
120
122 cyr_expire -E 3 -D 60 -X 60
123 Purge duplicates database of all entries older than 3 days, remove
124 deleted mailboxes older than 60 days and deleted messages older than
125 60 days.
126
127 cyr_expire -x -c -A 7d
128 Perform migration of message older than 7 days to Archive partition
129 whilst not altering conversation database nor expunging messages.
130
132 Archive partition and conversation support was first introduced in
133 Cyrus version 3.0.
134
136 /etc/imapd.conf
137
139 imapd.conf(5), master(8), cyradm(8)
140
142 The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Sys‐
143 tems)
144
146 1993-2017, The Cyrus Team
147
148
149
150
1513.0.13 December 16, 2019 CYR_EXPIRE(8)