1DOVEADM-MAILBOX(1)                  Dovecot                 DOVEADM-MAILBOX(1)
2
3
4

NAME

6       doveadm-mailbox - Commands related to handling mailboxes
7

SYNOPSIS

9       doveadm [-Dv] [-f formatter] mailbox_cmd [options] [arguments]
10

DESCRIPTION

12       doveadm mailbox can be used to query and modify mailboxes.
13

OPTIONS

15       Global doveadm(1) options:
16
17       -D     Enables verbosity and debug messages.
18
19       -f formatter
20              Specifies  the  formatter  for formatting the output.  Supported
21              formatters are:
22
23              flow   prints each line with key=value pairs.
24
25              pager  prints each key: value pair on its own line and separates
26                     records with form feed character (^L).
27
28              tab    prints  a  table  header  followed by tab separated value
29                     lines.
30
31              table  prints a table header followed by adjusted value lines.
32
33       -o setting=value
34              Overrides  the  configuration  setting  from  /etc/dovecot/dove‐
35              cot.conf  and from the userdb with the given value.  In order to
36              override multiple settings, the -o option may be specified  mul‐
37              tiple times.
38
39       -v     Enables verbosity, including progress counter.
40
41       Command specific options:
42
43       -A     If  the  -A option is present, the command will be performed for
44              all users.  Using this option in combination with  system  users
45              from  userdb  { driver = passwd } is not recommended, because it
46              contains also users with a lower UID  than  the  one  configured
47              with the first_valid_uid setting.
48
49              When  the  SQL  userdb  module  is used make sure that the iter‐
50              ate_query setting in  /etc/dovecot/dovecot-sql.conf.ext  matches
51              your  database  layout.  When using the LDAP userdb module, make
52              sure that  the  iterate_attrs  and  iterate_filter  settings  in
53              /etc/dovecot/dovecot-ldap.conf.ext match your LDAP schema.  Oth‐
54              erwise doveadm(1) will be unable to iterate over all users.
55
56       -F file
57              Execute the command for all the users in the file.  This is sim‐
58              ilar  to the -A option, but instead of getting the list of users
59              from the userdb, they are read from the given  file.   The  file
60              contains one username per line.
61
62       -S socket_path
63              The option's argument is either an absolute path to a local UNIX
64              domain socket, or a hostname and port (hostname:port), in  order
65              to connect a remote host via a TCP socket.
66
67              This allows an administrator to execute doveadm(1) mail commands
68              through the given socket.
69
70       -u user/mask
71              Run the command only for the given user.  It's also possible  to
72              use '*' and '?' wildcards (e.g. -u *@example.org).
73              When  neither  the  -A  option,  nor the -F file option, nor the
74              -u user was specified, the command will  be  executed  with  the
75              environment of the currently logged in user.
76

ARGUMENTS

78       mailbox
79              Is  the name of a mailbox, as visible to IMAP clients, except in
80              UTF-8 format. The hierarchy separator between a parent and child
81              mailbox  is  commonly  '/'  or  '.',  but  this  depends on your
82              selected mailbox storage format and namespace configuration. The
83              mailbox names may also require a namespace prefix.
84

COMMANDS

86   mailbox create
87       doveadm  mailbox create [-A|-u user|-F file] [-S socket_path] [-g guid]
88       [-s] mailbox ...
89
90       This command is used to create one or more mailboxes.  The mailbox for‐
91       mat  of  the created mailboxes depends on the mail_location setting, or
92       the user's mail field, returned by the userdb.
93
94       -g guid
95              Create the mailbox with the specified GUID.
96
97       -s     When this option was given, the created mailboxes will  be  also
98              added to the user's subscriptions.
99
100   mailbox cryptokey
101       mailbox cryptokey export|generate|list|password
102
103       This  command  is  used to manage mail crypt plugin cryptographic keys.
104       Please see doveadm-mailbox-cryptokey(1) for more details.
105
106   mailbox delete
107       doveadm mailbox delete [-A|-u user|-F file] [-S socket_path] [-s]  [-r]
108       [-e] [-Z] mailbox ...
109
110       This  command  deletes  a mailbox and expunges all the messages it con‐
111       tains.  If the mailbox has any children, they won't be deleted,  unless
112       -r is given.
113
114       -r     Delete mailboxes recursively
115
116       -s     Unsubscribe deleted mailboxes.
117
118       -e     Require mailboxes to be empty before deleting.
119
120       -Z     Delete  the mailbox as efficiently as possible, but the user may
121              not be in fully consistent state afterwards. For  example  quota
122              may  be  wrong.  This  option is mainly useful when deleting the
123              entire user.
124
125   mailbox list
126       doveadm mailbox list [-7|-8] [-A|-u user|-F file] [-S socket_path] [-s]
127       [mailbox ...]
128
129       To  get  an overview of existing mailboxes use this command.  It's also
130       possible to use wildcards in the mailbox name.
131       When the -s option  is  present,  only  subscribed  mailboxes  will  be
132       listed.  Listed  subscriptions  may  also  contain  mailboxes  that are
133       already deleted.
134
135       -7     Lists the mailboxes with mUTF-7 encoding.
136
137       -8     Lists the mailboxes with UTF-8 encoding.
138
139   mailbox mutf7
140       doveadm mailbox mutf7 [-7|-8] name ...
141
142       The mailbox mutf7 command may be  used  to  convert  the  international
143       mailbox  name  into  a  modified version of the UTF-7 encoding and vice
144       versa.  See RFC 3501, section 5.1.3 (Mailbox International Naming  Con‐
145       vention).
146
147       -7     Indicates  that  the  name's  string  representation  is  mUTF-7
148              encoded and it should be converted to UTF-8.
149
150       -8     Indicates that the name's is UTF-8 encoded and  should  be  con‐
151              verted to mUTF-7 (default).
152
153       name   One or more mailbox names that should be converted.
154
155   mailbox rename
156       doveadm  mailbox  rename  [-A|-u  user|-F  file]  [-S socket_path] [-s]
157       old_name new_name
158
159       The mailbox rename command is used to rename the  mailbox  old_name  to
160       new_name.
161       When the -s option is given, old_name will be unsubscribed and new_name
162       will be subscribed.
163
164   mailbox status
165       doveadm  [-f  formatter]  mailbox  status  [-A|-u  user|-F  file]   [-S
166       socket_path] [-t] fields mailbox ...
167
168       Show  the  status  of one or more mailboxes.  The mailbox name may also
169       contain wildcards.
170       This command uses by default the output formatter flow.
171
172       -t     Summarize the values of  the  status  fields  messages,  recent,
173              unseen and/or vsize of multiple mailboxes to a sum (total).
174
175       fields Specify  the  status  fields which should be shown.  In order to
176              specify multiple status fields, enclosed them in quotes.
177
178              all    This is a special status field name.  It means  show  all
179                     of  the following fields.  When the -t option is present,
180                     it means show only the messages, recent, unseen and vsize
181                     fields.
182
183              guid   The mailbox's globally unique identifier.
184
185              highestmodseq
186                     The  highest  mod-sequence  value  of all messages in the
187                     mailbox.
188
189              messages
190                     The number of messages in the mailbox.
191
192              recent The number of messages with the \Recent flag set.
193
194              uidnext
195                     The next unique identifier value.
196
197              uidvalidity
198                     The unique identifier validity value.
199
200              unseen The message sequence number of the first  unseen  message
201                     in the mailbox.
202
203              vsize  The  mailbox's virtual size, computed with CRLF line ter‐
204                     minators.
205
206              firstsaved
207                     Saved time of the first mail in the mailbox.
208
209   mailbox subscribe
210       doveadm mailbox subscribe [-A|-u user|-F file] [-S  socket_path]  mail‐
211       box ...
212
213       This command is used to subscribe one or more mailboxes.
214
215   mailbox unsubscribe
216       doveadm mailbox unsubscribe [-A|-u user|-F file] [-S socket_path] mail‐
217       box ...
218
219       This command is used to unsubscribe one or more mailboxes.
220
221   mailbox update
222       doveadm mailbox update [-A|-u user|-F] [-S socket_path] [--mailbox-guid
223       guid] [--uid-validity uid] [--min-next-uid uid] [--min-first-recent-uid
224       uid] [--min-highest-modseq seq]  [--min-highest-pvt-modseq  seq]  mail‐
225       box ...
226
227       This  command  is  used to set UID validity, next UID, first recent UID
228       and modification sequence values.
229
230       Usually this is only ever to be used  during  migration,  or  restoring
231       mailbox  after  disaster.  Settings these values is highly discouraged,
232       and is not supported for all mail backends.
233
234   mailbox cache purge
235       doveadm mailbox cache purge [-A|-u user|-F file] [-S socket_path] mail‐
236       box ...
237
238       Purge the dovecot.index.cache file. Most importantly this frees up disk
239       space from mails that were already deleted. Normally there i no need to
240       run this command manually, because the compression is also run automat‐
241       ically.
242
243   mailbox cache decision
244       doveadm mailbox cache decision [-A|-u user|-F  file]  [-S  socket_path]
245       [--all] [--fields list of fields] [--last-used unix timestamp] [--deci‐
246       sion no|temp|yes] mailbox ...
247
248       This command is used to list or change caching decisions  for  field(s)
249       in  mailbox(es).   You  can  list decisions by leaving out decision and
250       last-used parameters.
251
252       --all  List or change all fields.
253
254       --fields
255              List or change these comma/space separated fields.
256
257       --decision
258              Set field caching decision. Yes means it's always cached.   Temp
259              means  it's  provisionally  cached.   No  means the field is not
260              cached.
261
262       --last-used
263              Set field's last used timestamp.
264
265       NOTE. This command cannot be used to add new fields to cache! You  need
266       to  first  add  them  to  configuration. Setting caching to no will not
267       immediately drop field from cache, it will stop  adding  the  field  to
268       cache.
269
270   mailbox cache remove
271       doveadm  mailbox  cache  remove  [-A|-u  user|-F file] [-S socket_path]
272       searchquery
273
274       Remove any matching mail(s) from cache.
275
276       WARNING! This command can erase ALL cached data, causing  system  slow‐
277       ness.
278

EXAMPLE

280       List subscribed mailboxes, beginning with 'dovecot', of user bob.
281
282       doveadm mailbox list -s -u bob dovecot*
283       dovecot
284       dovecot/pigeonhole
285       dovecot/pigeonhole/2.0
286
287       Now have a look at the status of user bob's dovecot mailboxes.
288
289       doveadm -f table mailbox status -u bob "messages vsize" dovecot*
290       mailbox                                    messages vsize
291       dovecot                                    20501    93968492
292       dovecot/pigeonhole                         0        0
293       dovecot/pigeonhole/2.0                     47       323474
294
295       Converting  an  internationalized mailbox name from mUTF-7 to UTF-8 and
296       vice versa.
297
298       doveadm mailbox mutf7 -7 "~peter/mail/&U,BTFw-/&ZeVnLIqe-"
299       ~peter/mail/台北/日本語
300       doveadm mailbox mutf7 ~peter/mail/台北/日本語
301       ~peter/mail/&U,BTFw-/&ZeVnLIqe-
302

REPORTING BUGS

304       Report bugs, including doveconf -n output, to the Dovecot Mailing  List
305       <dovecot@dovecot.org>.   Information  about reporting bugs is available
306       at: http://dovecot.org/bugreport.html
307

SEE ALSO

309       doveadm(1) doveadm-search-query(7) doveadm-mailbox-cryptokey(1)
310
311
312
313Dovecot v2.3                      2015-05-09                DOVEADM-MAILBOX(1)
Impressum