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, --archive-duration=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, --delete-duration=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, --expire-duration=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, --expunge-duration=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, --no-conversations
110              Do not expire conversation database entries, even if the conver‐
111              sations feature is enabled.
112
113              This feature was introduced in version 3.0.
114
115       -x, --no-expunge
116              Do not expunge messages even  if  using  delayed  expunge  mode.
117              This  reduces IO traffic considerably, allowing cyr_expire to be
118              run frequently to clean up the duplicate database without  over‐
119              loading the machine.
120
121       -p mailbox-prefix, --prefix=mailbox-prefix
122              Only   find   mailboxes   starting   with   this  prefix,   e.g.
123              "user.justgotspammedlots".
124
125       -u userid, --userid=userid
126              Only  find  mailboxes  belonging  to  this   user,    e.g.    "‐
127              justgotspammedlots@example.com".
128
129       -t, --prune-userflags
130              Remove  any  user flags which are not used by remaining (not ex‐
131              punged) messages.
132
133       -v, --verbose
134              Enable verbose output.
135
136       -a, --ignore-annotations
137              Skip the annotation lookup, so  all  /vendor/cmu/cyrus-imapd/ex‐
138              pire  annotations  are  ignored entirely.  It behaves as if they
139              were not set, so only expire-days is considered  for  all  mail‐
140              boxes.
141

EXAMPLES

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

HISTORY

153       Archive partition and conversation  support  was  first  introduced  in
154       Cyrus version 3.0.
155

FILES

157       /etc/imapd.conf
158

SEE ALSO

160       imapd.conf(5), master(8), cyradm(8)
161

AUTHOR

163       The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Sys‐
164       tems)
165
167       1993–2023, The Cyrus Team
168
169
170
171
1723.8.1                            Sep 11, 2023                    CYR_EXPIRE(8)
Impressum