1CYR_EXPIRE(8)                     Cyrus IMAP                     CYR_EXPIRE(8)
2
3
4

NAME

6       cyr_expire - Cyrus IMAP documentation
7
8       Expire messages and duplicate delivery database entries
9

SYNOPSIS

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

DESCRIPTION

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 “de‐
25         layed” expunge mode), and
26
27       • remove deleted mailboxes (when using the “delayed” delete mode), and
28
29       • expire entries from conversations databases, and
30
31       • archive messages from mailbox.
32
33       There are various annotations that cyr_expire respects:
34
35/vendor/cmu/cyrus-imapd/expire which controls the expirations of mes‐
36         sages
37
38/vendor/cmu/cyrus-imapd/archive which controls the archival  of  mes‐
39         sages
40
41/vendor/cmu/cyrus-imapd/delete  which  controls  the deletion of mes‐
42         sages
43
44       These mailbox annotations specify the age(in days) of messages  in  the
45       given mailbox that should be expired/archived/deleted.
46
47       The value of the /vendor/cmu/cyrus-imapd/expire annotation is inherited
48       by all children of the mailbox on which it is set, so an entire mailbox
49       tree  can  be  configured by setting a single annotation on the root of
50       that tree.  If a mailbox does not have a /vendor/cmu/cyrus-imapd/expire
51       annotation  set  on  it (or does not inherit one), then no messages are
52       expired from the mailbox.
53
54       The annotation can be examined using the info command of cyradm(8), and
55       modified using the mboxconfig and setinfo commands of cyradm(8).
56
57       Expiration  of  duplicate delivery database entries for a given mailbox
58       is also controlled  by  the  /vendor/cmu/cyrus-imapd/expire  annotation
59       which  applies  to  that mailbox.  A value of 0 on the annotation means
60       that no expiration is to be performed on that mailbox.  Unlike  message
61       expiration,  if  no  annotation  applies  to the mailbox then duplicate
62       database entries are expired using the value given to the -E option.
63
64       Expiration of conversations database entries occurs  if  the  conversa‐
65       tions  option  is present in imapd.conf(5).  Expiration can be disabled
66       using the -c option.  The period used to expire entries  is  controlled
67       by the conversations_expire_days option in imapd.conf(5).
68
69       cyr_expire  reads  its  configuration  options out of the imapd.conf(5)
70       file unless specified otherwise by -C.
71
72       cyr_expire requires at least one of -A -D -E -X or -t to be supplied.
73

OPTIONS

75       -C config-file
76              Use the specified configuration file config-file rather than the
77              default imapd.conf(5).
78
79       -A archive-duration
80              Archive  non-flagged messages older than archive-duration to the
81              archive partition, allowing mailbox messages to be split between
82              fast  storage  and  slow  large  storage.  Only does anything if
83              archivepartition-* has been set in your config.  This  value  is
84              only  used  for  entries which do not have a corresponding /ven‐
85              donr/cmu/cyrus-imapd/archive mailbox annotation.
86
87              This feature was introduced in version 3.0.
88
89       -D delete-duration
90              Remove previously deleted mailboxes older  than  delete-duration
91              (when  using  the  “delayed”  delete  mode).  The value can be a
92              floating point number, and may have a suffix to specify the unit
93              of time.  If no suffix, the value is number of days.  Valid suf‐
94              fixes are d (days), h (hours),  m  (minutes)  and  s  (seconds).
95              This  value  is only used for entries which do not have a corre‐
96              sponding /verdor/cmu/cyrus-imapd/delete mailbox annotation.
97
98       -E expire-duration
99              Prune the duplicate database of entries older than  expire-dura‐
100              tion.   This  value is only used for entries which do not have a
101              corresponding /vendor/cmu/cyrus-imapd/expire mailbox annotation.
102              Format is the same as delete-duration.
103
104       -X expunge-duration
105              Expunge  previously deleted messages older than expunge-duration
106              (when using the “delayed” expunge mode).  Format is the same  as
107              delete-duration.
108
109       -c     Do not expire conversation database entries, even if the conver‐
110              sations feature is enabled.
111
112              This feature was introduced in version 3.0.
113
114       -x     Do not expunge messages even  if  using  delayed  expunge  mode.
115              This  reduces IO traffic considerably, allowing cyr_expire to be
116              run frequently to clean up the duplicate database without  over‐
117              loading the machine.
118
119       -p mailbox-prefix
120              Only   find   mailboxes   starting   with   this  prefix,   e.g.
121              “user.justgotspammedlots”.
122
123       -u userid
124              Only  find  mailboxes  belonging  to  this   user,    e.g.    “‐
125              justgotspammedlots@example.com”.
126
127       -t     Remove  any  user flags which are not used by remaining (not ex‐
128              punged) messages.
129
130       -v     Enable verbose output.
131
132       -a     Skip the annotation lookup, so  all  /vendor/cmu/cyrus-imapd/ex‐
133              pire  annotations  are  ignored entirely.  It behaves as if they
134              were not set, so only expire-days is considered  for  all  mail‐
135              boxes.
136

EXAMPLES

138       cyr_expire -E 3 -D 60 -X 60
139          Purge  duplicates  database of all entries older than 3 days, remove
140          deleted mailboxes older than 60 days and deleted messages older than
141          60 days.
142
143       cyr_expire -x -c -A 7d
144          Perform  migration of message older than 7 days to Archive partition
145          whilst not altering conversation database nor expunging messages.
146

HISTORY

148       Archive partition and conversation  support  was  first  introduced  in
149       Cyrus version 3.0.
150

FILES

152       /etc/imapd.conf
153

SEE ALSO

155       imapd.conf(5), master(8), cyradm(8)
156

AUTHOR

158       The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Sys‐
159       tems)
160
162       1993-2018, The Cyrus Team
163
164
165
166
1673.2.8                         September 01, 2021                 CYR_EXPIRE(8)
Impressum