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] mail‐
108       box ...
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.
112       When the -s option is present,  the  deleted  mailboxes  will  be  also
113       unsubscribed.
114
115   mailbox list
116       doveadm mailbox list [-7|-8] [-A|-u user|-F file] [-S socket_path] [-s]
117       [mailbox ...]
118
119       To get an overview of existing mailboxes use this command.   It's  also
120       possible to use wildcards in the mailbox name.
121       When  the  -s  option  is  present,  only  subscribed mailboxes will be
122       listed. Listed  subscriptions  may  also  contain  mailboxes  that  are
123       already deleted.
124
125       -7     Lists the mailboxes with mUTF-7 encoding.
126
127       -8     Lists the mailboxes with UTF-8 encoding.
128
129   mailbox mutf7
130       doveadm mailbox mutf7 [-7|-8] name ...
131
132       The  mailbox  mutf7  command  may  be used to convert the international
133       mailbox name into a modified version of the  UTF-7  encoding  and  vice
134       versa.   See RFC 3501, section 5.1.3 (Mailbox International Naming Con‐
135       vention).
136
137       -7     Indicates  that  the  name's  string  representation  is  mUTF-7
138              encoded and it should be converted to UTF-8.
139
140       -8     Indicates  that  the  name's is UTF-8 encoded and should be con‐
141              verted to mUTF-7 (default).
142
143       name   One or more mailbox names that should be converted.
144
145   mailbox rename
146       doveadm mailbox rename  [-A|-u  user|-F  file]  [-S  socket_path]  [-s]
147       old_name new_name
148
149       The  mailbox  rename  command is used to rename the mailbox old_name to
150       new_name.
151       When the -s option is given, old_name will be unsubscribed and new_name
152       will be subscribed.
153
154   mailbox status
155       doveadm   [-f  formatter]  mailbox  status  [-A|-u  user|-F  file]  [-S
156       socket_path] [-t] fields mailbox ...
157
158       Show the status of one or more mailboxes.  The mailbox  name  may  also
159       contain wildcards.
160       This command uses by default the output formatter flow.
161
162       -t     Summarize  the  values  of  the  status fields messages, recent,
163              unseen and/or vsize of multiple mailboxes to a sum (total).
164
165       fields Specify the status fields which should be shown.   In  order  to
166              specify multiple status fields, enclosed them in quotes.
167
168              all    This  is  a special status field name.  It means show all
169                     of the following fields.  When the -t option is  present,
170                     it means show only the messages, recent, unseen and vsize
171                     fields.
172
173              guid   The mailbox's globally unique identifier.
174
175              highestmodseq
176                     The highest mod-sequence value of  all  messages  in  the
177                     mailbox.
178
179              messages
180                     The number of messages in the mailbox.
181
182              recent The number of messages with the \Recent flag set.
183
184              uidnext
185                     The next unique identifier value.
186
187              uidvalidity
188                     The unique identifier validity value.
189
190              unseen The  message  sequence number of the first unseen message
191                     in the mailbox.
192
193              vsize  The mailbox's virtual size, computed with CRLF line  ter‐
194                     minators.
195
196              firstsaved
197                     Saved time of the first mail in the mailbox.
198
199   mailbox subscribe
200       doveadm  mailbox  subscribe [-A|-u user|-F file] [-S socket_path] mail‐
201       box ...
202
203       This command is used to subscribe one or more mailboxes.
204
205   mailbox unsubscribe
206       doveadm mailbox unsubscribe [-A|-u user|-F file] [-S socket_path] mail‐
207       box ...
208
209       This command is used to unsubscribe one or more mailboxes.
210
211   mailbox update
212       doveadm mailbox update [-A|-u user|-F] [-S socket_path] [--mailbox-guid
213       guid] [--uid-validity uid] [--min-next-uid uid] [--min-first-recent-uid
214       uid]  [--min-highest-modseq  seq]  [--min-highest-pvt-modseq seq] mail‐
215       box ...
216
217       This command is used to set UID validity, next UID,  first  recent  UID
218       and modification sequence values.
219
220       Usually  this  is  only  ever to be used during migration, or restoring
221       mailbox after disaster.  Settings these values is  highly  discouraged,
222       and is not supported for all mail backends.
223
224   mailbox cache decision
225       doveadm  mailbox  cache  decision [-A|-u user|-F file] [-S socket_path]
226       [--all] [--fields list of fields] [--last-used unix timestamp] [--deci‐
227       sion no|temp|yes] mailbox ...
228
229       This  command  is used to list or change caching decisions for field(s)
230       in mailbox(es).  You can list decisions by  leaving  out  decision  and
231       last-used parameters.
232
233       --all  List or change all fields.
234
235       --fields
236              List or change these comma/space separated fields.
237
238       --decision
239              Set  field caching decision. Yes means it's always cached.  Temp
240              means it's provisionally cached.  No  means  the  field  is  not
241              cached.
242
243       --last-used
244              Set field's last used timestamp.
245
246       NOTE.  This command cannot be used to add new fields to cache! You need
247       to first add them to configuration. Setting  caching  to  no  will  not
248       immediately  drop  field  from  cache, it will stop adding the field to
249       cache.
250
251   mailbox cache remove
252       doveadm mailbox cache remove  [-A|-u  user|-F  file]  [-S  socket_path]
253       searchquery
254
255       Remove any matching mail(s) from cache.
256
257       WARNING!  This  command can erase ALL cached data, causing system slow‐
258       ness.
259

EXAMPLE

261       List subscribed mailboxes, beginning with 'dovecot', of user bob.
262
263       doveadm mailbox list -s -u bob dovecot*
264       dovecot
265       dovecot/pigeonhole
266       dovecot/pigeonhole/2.0
267
268       Now have a look at the status of user bob's dovecot mailboxes.
269
270       doveadm -f table mailbox status -u bob "messages vsize" dovecot*
271       mailbox                                    messages vsize
272       dovecot                                    20501    93968492
273       dovecot/pigeonhole                         0        0
274       dovecot/pigeonhole/2.0                     47       323474
275
276       Converting an internationalized mailbox name from mUTF-7 to  UTF-8  and
277       vice versa.
278
279       doveadm mailbox mutf7 -7 "~peter/mail/&U,BTFw-/&ZeVnLIqe-"
280       ~peter/mail/台北/日本語
281       doveadm mailbox mutf7 ~peter/mail/台北/日本語
282       ~peter/mail/&U,BTFw-/&ZeVnLIqe-
283

REPORTING BUGS

285       Report  bugs, including doveconf -n output, to the Dovecot Mailing List
286       <dovecot@dovecot.org>.  Information about reporting bugs  is  available
287       at: http://dovecot.org/bugreport.html
288

SEE ALSO

290       doveadm(1) doveadm-search-query(7) doveadm-mailbox-cryptokey(1)
291
292
293
294Dovecot v2.2                      2015-05-09                DOVEADM-MAILBOX(1)
Impressum