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