| 1 |
.. cyrusman:: ctl_mboxlist(8) |
| 2 |
|
| 3 |
.. author: Nic Bernstein (Onlight) |
| 4 |
.. author: Jeroen van Meeuwen (Kolab Systems) |
| 5 |
|
| 6 |
.. _imap-reference-manpages-systemcommands-ctl_mboxlist: |
| 7 |
|
| 8 |
================ |
| 9 |
**ctl_mboxlist** |
| 10 |
================ |
| 11 |
|
| 12 |
Perform operations on the mailbox list database |
| 13 |
|
| 14 |
Synopsis |
| 15 |
======== |
| 16 |
|
| 17 |
.. parsed-literal:: |
| 18 |
|
| 19 |
**ctl_mboxlist** [ **-C** *config-file* ] **-d** [ **-x** ] [**-y**] [ **-p** *partition* ] [ **-f** *filename* ] |
| 20 |
**ctl_mboxlist** [ **-C** *config-file* ] **-u** [ **-f** *filename* ] [ **-L** ] |
| 21 |
**ctl_mboxlist** [ **-C** *config-file* ] **-m** [ **-a** ] [ **-w** ] [ **-i** ] [ **-f** *filename* ] |
| 22 |
**ctl_mboxlist** [ **-C** *config-file* ] **-v** [ **-f** *filename* ] |
| 23 |
|
| 24 |
Description |
| 25 |
=========== |
| 26 |
|
| 27 |
**ctl_mboxlist** is used to perform various administrative operations on |
| 28 |
the mailbox list database. |
| 29 |
|
| 30 |
**ctl_mboxlist** |default-conf-text| |
| 31 |
|def-confdir-text| mailboxes database. |
| 32 |
|
| 33 |
|
| 34 |
Options |
| 35 |
======= |
| 36 |
|
| 37 |
.. program:: ctl_mboxlist |
| 38 |
|
| 39 |
.. option:: -C config-file |
| 40 |
|
| 41 |
|cli-dash-c-text| |
| 42 |
|
| 43 |
.. option:: -d, --dump |
| 44 |
|
| 45 |
Dump the contents of the database to standard output in JSON format. |
| 46 |
|
| 47 |
.. option:: -x, --remove-dumped |
| 48 |
|
| 49 |
When performing a dump, remove the mailboxes dumped from the mailbox |
| 50 |
list (mostly useful when specified with **-p**). |
| 51 |
|
| 52 |
.. option:: -y, --include-intermediaries |
| 53 |
|
| 54 |
When performing a dump, also list intermediary mailboxes which would |
| 55 |
be hidden from IMAP. |
| 56 |
|
| 57 |
.. option:: -p partition, --partition=partition |
| 58 |
|
| 59 |
When performing a dump, dump only those mailboxes that live on |
| 60 |
*partition*. |
| 61 |
|
| 62 |
.. option:: -f filename, --filename=filename |
| 63 |
|
| 64 |
Use the database specified by *filename* instead of the default |
| 65 |
(*configdirectory/mailboxes.db**). |
| 66 |
|
| 67 |
.. option:: -L, --legacy |
| 68 |
|
| 69 |
When performing an undump, use the legacy dump parser instead of the |
| 70 |
JSON parser. This might be useful for importing a dump produced |
| 71 |
by an older version of Cyrus. |
| 72 |
|
| 73 |
.. option:: -u, --undump |
| 74 |
|
| 75 |
Load ("undump") the contents of the database from standard input. The |
| 76 |
input MUST be a valid JSON file, unless the -L option is also supplied. |
| 77 |
|
| 78 |
.. IMPORTANT:: |
| 79 |
USE THIS OPTION WITH CARE. If you have modified the dump file since it |
| 80 |
was dumped, or if the file was not produced by **-d** in the first |
| 81 |
place, or was produced on a different server, you can easily break your |
| 82 |
mailboxes.db. Undump will refuse to process a syntactically-invalid |
| 83 |
dump file, but it can't do much to protect you from a valid file |
| 84 |
containing bad data. |
| 85 |
|
| 86 |
.. option:: -m, --sync-mupdate |
| 87 |
|
| 88 |
For backend servers in the Cyrus Murder, synchronize the local |
| 89 |
mailbox list file with the MUPDATE server. |
| 90 |
|
| 91 |
.. option:: -a, --authoritative |
| 92 |
|
| 93 |
When used with **-m**, assume the local mailboxes file is authoritative, |
| 94 |
that is, only change the mupdate server, do not delete any local |
| 95 |
mailboxes. |
| 96 |
|
| 97 |
.. IMPORTANT:: |
| 98 |
USE THIS OPTION WITH CARE, as it allows namespace collisions into |
| 99 |
the murder. |
| 100 |
|
| 101 |
.. option:: -w, --warn-only |
| 102 |
|
| 103 |
When used with **-m**, print out what would be done but do not perform |
| 104 |
the operations. |
| 105 |
|
| 106 |
.. option:: -i, --interactive |
| 107 |
|
| 108 |
When used with **-m**, asks for verification before deleting local |
| 109 |
mailboxes. |
| 110 |
|
| 111 |
.. option:: -v, --verify |
| 112 |
|
| 113 |
Verify the consistency of the mailbox list database and the spool |
| 114 |
partition(s). Mailboxes present in the database and not located on a |
| 115 |
spool partition, and those located on a spool partition (directory |
| 116 |
containing a valid cyrus.header file) and not present in the database |
| 117 |
will be reported. Note that this function is very I/O intensive. |
| 118 |
|
| 119 |
Examples |
| 120 |
======== |
| 121 |
|
| 122 |
.. parsed-literal:: |
| 123 |
|
| 124 |
**ctl_mboxlist -d** |
| 125 |
|
| 126 |
.. |
| 127 |
|
| 128 |
Dump the mailboxes list to standard output in JSON format |
| 129 |
|
| 130 |
.. parsed-literal:: |
| 131 |
|
| 132 |
**ctl_mboxlist -u** < *newmboxlist.dump* |
| 133 |
|
| 134 |
.. |
| 135 |
|
| 136 |
Undump (restore) the mailboxes database from *newmboxlist.dump*, |
| 137 |
where *newmboxlist.dump* is a JSON file produced by **ctl_mboxlist -d** |
| 138 |
|
| 139 |
.. Note:: |
| 140 |
Be very careful with this option. |
| 141 |
|
| 142 |
.. parsed-literal:: |
| 143 |
|
| 144 |
**ctl_mboxlist -m** |
| 145 |
|
| 146 |
.. |
| 147 |
|
| 148 |
Synchronize our mailboxes database with the MUPDATE server. (One may |
| 149 |
commonly put a command like this into the **START** section of |
| 150 |
:cyrusman:`cyrus.conf(5)` on backend nodes of a Murder cluster to cause |
| 151 |
the backend to synchronize its mailbox list with the mupdate master upon |
| 152 |
startup). |
| 153 |
|
| 154 |
.. only:: html |
| 155 |
|
| 156 |
:: |
| 157 |
|
| 158 |
START { |
| 159 |
## |
| 160 |
# Master sends mailbox updates to mupdate. |
| 161 |
# Replication client runs on Master. |
| 162 |
# Comment these 2 lines out on replicas |
| 163 |
mupdatepush cmd="/usr/lib/cyrus/bin/ctl_mboxlist -m" |
| 164 |
syncclient cmd="/usr/lib/cyrus/bin/sync_client -r" |
| 165 |
<...> |
| 166 |
} |
| 167 |
.. |
| 168 |
|
| 169 |
.. parsed-literal:: |
| 170 |
|
| 171 |
**ctl_mboxlist -m -w** |
| 172 |
|
| 173 |
.. |
| 174 |
|
| 175 |
The same as above, but only show us what would be done, don't actually |
| 176 |
do it. |
| 177 |
|
| 178 |
.. parsed-literal:: |
| 179 |
|
| 180 |
**ctl_mboxlist -m -a** |
| 181 |
|
| 182 |
.. |
| 183 |
|
| 184 |
Populate the Mupdate server from our copy of the mailboxes database. |
| 185 |
|
| 186 |
.. Note:: |
| 187 |
Be very careful with this option, as it can create conflicts in the |
| 188 |
Murder. |
| 189 |
|
| 190 |
.. parsed-literal:: |
| 191 |
|
| 192 |
**ctl_mboxlist -m -i** |
| 193 |
|
| 194 |
.. |
| 195 |
|
| 196 |
Synchronize our mailboxes database with the MUPDATE server interactively, |
| 197 |
asking for verification before deleting any local mailboxes. |
| 198 |
|
| 199 |
|
| 200 |
Files |
| 201 |
===== |
| 202 |
|
| 203 |
/etc/imapd.conf, <configdirectory>/mailboxes.db |
| 204 |
|
| 205 |
See Also |
| 206 |
======== |
| 207 |
|
| 208 |
:cyrusman:`imapd.conf(5)`, :cyrusman:`master(8)` |