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

NAME

6       reconstruct - Cyrus IMAP documentation
7
8       Reconstruct mailboxes
9

SYNOPSIS

11       reconstruct [ -C config-file ] [ -p partition ] [ -x ] [ -r ]
12           [ -f ] [ -U ] [ -s ] [ -q ] [ -G ] [ -R ] [ -o ]
13           [ -O ] [ -M ] mailbox...
14
15       reconstruct [ -C config-file ] [ -p partition ] [ -x ] [ -r ]
16           [ -f ] [ -U ] [ -s ] [ -q ] [ -G ] [ -R ] [ -o ]
17           [ -O ] [ -M ] -u user...
18
19       reconstruct [ -C config-file ] [ -p partition ] [ -r ]
20           [ -q ] -V version mailbox...
21
22       reconstruct [ -C config-file ] [ -p partition ] [ -r ]
23           [ -q ] -V version -u user...
24

DESCRIPTION

26       reconstruct rebuilds one or more IMAP mailboxes.  It can be used to re‐
27       cover from almost any sort of data corruption.
28
29       If reconstruct can find existing header and index files, it attempts to
30       preserve  any data in them that is not derivable from the message files
31       themselves. The state reconstruct attempts  to  preserve  includes  the
32       flag names, flag state, and internaldate.
33
34       reconstruct derives all other information from the message files.
35
36       reconstruct  reads  its  configuration options out of the imapd.conf(5)
37       file unless specified otherwise by -C.  Any  mailbox  directory  under‐
38       neath  the path specified in the partition-news configuration option is
39       assumed to be in news format.
40
41       reconstruct does not adjust the quota usage recorded in any quota  root
42       files.  After running reconstruct, it is advisable to run quota(8) with
43       the -f switch in order to fix the quota root files.
44
45       When upgrading versions of Cyrus software, it may be necessary  to  run
46       reconstruct  with  the -V option, to rebuild indexes to a given version
47       (or max for the most recent).  Note that the -V option cannot  be  com‐
48       bined  with  most other reconstruct options.  If a mailbox needs recon‐
49       structing you should do that first, and then upgrade it  with  -V  once
50       it’s good.
51

OPTIONS

53       -C config-file
54              Use the specified configuration file config-file rather than the
55              default imapd.conf(5).
56
57       -p partition
58              Search for the listed (non-existant) mailboxes on the  indicated
59              partition.  Create  the mailboxes in the database in addition to
60              reconstructing them. (not compatible with the use of wildcards)
61
62       -x     When processing a mailbox which is not in the mailbox list (e.g.
63              via  the  -p or -f options), do not import the metadata from the
64              mailbox, instead create it anew (this  specifically  affects  at
65              least  the  mailbox’s  seen state unique identifier, user flags,
66              and ACL).
67
68       -r     Recursively reconstruct all sub-mailboxes of  the  mailboxes  or
69              mailbox prefixes given as arguments.
70
71       -f     Examine  the  filesystem underneath mailbox, adding all directo‐
72              ries with a cyrus.header found there as new  mailboxes.   Useful
73              for restoring mailboxes from backups.
74
75       -s     Don’t stat underlying files.  This makes reconstruct run faster,
76              at the expense of not noticing some issues (like zero byte files
77              or size mismatches).  “reconstruct -s” should be quite fast.
78
79       -q     Emit less verbose information to syslog.
80
81       -n     Don’t make any changes.  Problems are reported, but not fixed.
82
83       -G     Force re-parsing of the underlying message (checks GUID correct‐
84              ness). Reconstruct with -G should fix  all  possible  individual
85              message issues, including corrupted data files.
86
87       -I     If  two  mailboxes  exist with the same UNIQUEID and reconstruct
88              visits both of them, -I will cause the second mailbox to have  a
89              new  UNIQUEID created for it.  If you don’t specify -I, you will
90              just get a syslog entry telling you of the clash.
91
92       -R     Perform a UID upgrade operation on  GUID  mismatch  files.   Use
93              this  option  if  you  think your index is corrupted rather than
94              your message files, or if all backup attempts  have  failed  and
95              you’re happy to be served the missing files.
96
97       -U     Use  this option if you have corrupt message files in your spool
98              and have been unable to restore them  from  backup.   This  will
99              make the mailbox IOERROR free and fix replication.
100
101              WARNING:  this  deletes corrupt message files for ever - so make
102              sure you’ve exhausted other options first!
103
104       -o     Ignore odd files in your  mailbox  disk  directories.   Probably
105              useful if you are using some tool which adds additional tracking
106              files.
107
108       -O     Delete odd files.  This is the opposite of -o.
109
110       -M     Prefer mailboxes.db over cyrus.header  -  will  rewrite  ACL  or
111              uniqueid  from the mailboxes.db into the header file rather than
112              the other way around.  This feature was  introduced  in  version
113              3.0.
114
115       -V version
116              Change  the  cyrus.index  minor  version  to a specific version.
117              This can be useful for upgrades or  downgrades.  Use  a  magical
118              version  of max to upgrade to the latest available database for‐
119              mat version.
120
121       -u     Instead of mailbox prefixes, give usernames on the command line
122

EXAMPLES

124       reconstruct -r -f tech.support
125          Recursively reconstruct all mailboxes within the tech.support  hier‐
126          archy, restoring any directories containing cyrus.header files.
127
128       reconstruct -r -f tech.support.Archive.2%
129          Recursively  reconstruct  all  mailboxes within the tech.support.Ar‐
130          chive hierarchy with names beginning with ‘2’, restoring any  direc‐
131          tories containing cyrus.header files.
132
133       reconstruct -r -f -u jsmith
134          Recursively reconstruct all mailboxes belonging to jsmith, restoring
135          any directories containing cyrus.header files.
136

HISTORY

138       The options -k (keep flags) and -g (clear GUID) have been deprecated in
139       Cyrus version 2.4.
140
141       The -u and -V options were added in Cyrus version 2.5.
142
143       The -M option was added in Cyrus version 3.0.
144

FILES

146       /etc/imapd.conf
147

SEE ALSO

149       imapd.conf(5)
150

AUTHOR

152       The Cyrus Team, Nic Bernstein (Onlight)
153
155       1993-2018, The Cyrus Team
156
157
158
159
1603.2.8                         September 01, 2021                RECONSTRUCT(8)
Impressum