1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
|
.\" Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file
.TH DOVEADM\-MAILBOX 1 "2015-05-09" "Dovecot v2.3" "Dovecot"
.SH NAME
doveadm\-mailbox \- Commands related to handling mailboxes
.\"------------------------------------------------------------------------
.SH SYNOPSIS
.BR doveadm " [" \-Dv "] [" \-f
.IR formatter "] " mailbox_cmd " [" options "] [" arguments ]
.\"------------------------------------------------------------------------
.SH DESCRIPTION
.B doveadm mailbox
can be used to query and modify mailboxes.
.\"------------------------------------------------------------------------
@INCLUDE:global-options-formatter@
.\" --- command specific options --- "/.
.PP
Command specific
.IR options :
.\"-------------------------------------
@INCLUDE:option-A@
.\"-------------------------------------
@INCLUDE:option-F-file@
.\"-------------------------------------
@INCLUDE:option-S-socket@
.\"-------------------------------------
@INCLUDE:option-u-user@
.\"------------------------------------------------------------------------
.SH ARGUMENTS
.TP
.I mailbox
Is the name of a
.IR mailbox ,
as visible to IMAP clients, except in UTF\-8 format. The hierarchy
separator between a parent and child mailbox is commonly
.RB \(aq / \(aq
or
.RB \(aq . \(aq,
but this depends on your selected mailbox storage format and namespace
configuration. The mailbox names may also require a namespace prefix.
.\"------------------------------------------------------------------------
.SH COMMANDS
.SS mailbox create
.B doveadm mailbox create
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.RB [ \-g
.IR guid ]
.RB [ \-s ]
.IR mailbox\ ...
.PP
This command is used to create one or more mailboxes.
The mailbox format of the created mailboxes depends on the
.I mail_location
setting, or the user\(aqs
.I mail
field, returned by the userdb.
.PP
.TP
.BI \-g \ guid
Create the mailbox with the specified GUID.
.TP
.B \-s
When this
option was given, the created mailboxes will be also added to the user\(aqs
subscriptions.
.\"------------------------------------------------------------------------
.SS mailbox cryptokey
.B mailbox cryptokey export|generate|list|password
.PP
This command is used to manage mail crypt plugin cryptographic keys.
Please see doveadm-mailbox-cryptokey(1) for more details.
.\"------------------------------------------------------------------------
.SS mailbox delete
.B doveadm mailbox delete
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.RB [ \-s ]
.RB [ \-r ]
.RB [ \-e ]
.RB [ \-Z ]
.IR mailbox\ ...
.PP
This command deletes a mailbox and expunges all the messages it contains.
If the mailbox has any children, they won\(aqt be deleted, unless
.B \-r
is given.
.PP
.\"-------------------------------------
.TP
.B \-r
Delete mailboxes recursively
.\"-------------------------------------
.TP
.B \-s
Unsubscribe deleted mailboxes.
.\"-------------------------------------
.TP
.B \-e
Require mailboxes to be empty before deleting.
.\"-------------------------------------
.TP
.B \-Z
Delete the mailbox as efficiently as possible, but the user may not be in fully consistent state afterwards. For example quota may be wrong. This option is mainly useful when deleting the entire user.
.\"------------------------------------------------------------------------
.SS mailbox list
.B doveadm mailbox list
.RB [ \-7 | \-8 ]
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.RB [ \-s ]
[\fImailbox\fP ...]
.PP
To get an overview of existing mailboxes use this command.
It\(aqs also possible to use wildcards in the
.I mailbox
name.
.br
When the
.B \-s
option is present, only subscribed mailboxes will be listed. Listed
subscriptions may also contain mailboxes that are already deleted.
.PP
.\"-------------------------------------
.TP
.B \-7
Lists the mailboxes with mUTF\-7 encoding.
.\"-------------------------------------
.TP
.B \-8
Lists the mailboxes with UTF\-8 encoding.
.\"------------------------------------------------------------------------
.SS mailbox mutf7
.B doveadm mailbox mutf7
.RB [ \-7 | \-8 ]
.IR name\ ...
.PP
The
.B mailbox mutf7
command may be used to convert the international mailbox
.I name
into a modified version of the UTF\-7 encoding and vice versa.
See RFC 3501, section 5.1.3 (Mailbox International Naming Convention).
.PP
.\"-------------------------------------
.TP
.B \-7
Indicates that the
.IR name \(aqs
string representation is mUTF\-7 encoded and it should be converted to
UTF\-8.
.\"-------------------------------------
.TP
.B \-8
Indicates that the
.IR name \(aqs
is UTF\-8 encoded and should be converted to mUTF\-7 (default).
.TP
.I name
One or more mailbox names that should be converted.
.\"------------------------------------------------------------------------
.SS mailbox rename
.B doveadm mailbox rename
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.RB [ \-s ]
.I old_name
.I new_name
.PP
The
.B mailbox rename
command is used to rename the mailbox
.I old_name
to
.IR new_name .
.br
When the
.B \-s
option is given,
.I old_name
will be unsubscribed
and
.I new_name
will be subscribed.
.\"------------------------------------------------------------------------
.SS mailbox status
.BR doveadm " [" \-f
.IR formatter ]
.B mailbox status
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP] [\fB\-t\fP]
.IR "fields mailbox\ " ...
.PP
Show the
.B status
of one or more mailboxes.
The
.I mailbox
name may also contain wildcards.
.br
This command uses by default the output
.I formatter
.BR flow .
.TP
.B \-t
Summarize the values of the status
.I fields
.BR messages ,
.BR recent ,
.BR unseen " and/or"
.B vsize
of multiple mailboxes to a sum (total).
.\"-------------------------------------
.TP
.I fields
Specify the status
.I fields
which should be shown.
In order to specify multiple status
.IR fields ,
enclosed them in quotes.
.RS
.TP
.B all
This is a special status field name.
It means show all of the following
.IR fields .
When the
.B \-t
option is present, it means show only the
.BR messages ,
.BR recent ,
.BR unseen " and"
.B vsize
.IR fields .
.TP
.B guid
The
.IR mailbox \(aqs
globally unique identifier.
.TP
.B highestmodseq
The highest mod\-sequence value of all messages in the
.IR mailbox .
.TP
.B messages
The number of messages in the
.IR mailbox .
.TP
.B recent
The number of messages with the \(rsRecent flag set.
.TP
.B uidnext
The next unique identifier value.
.TP
.B uidvalidity
The unique identifier validity value.
.TP
.B unseen
The message sequence number of the first unseen message in the
.IR mailbox .
.TP
.B vsize
The
.IR mailbox \(aqs
virtual size, computed with CRLF line terminators.
.TP
.B firstsaved
Saved time of the first mail in the mailbox.
.RE
.PP
.\"------------------------------------------------------------------------
.SS mailbox subscribe
.B doveadm mailbox subscribe
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.IR mailbox\ ...
.PP
This command is used to subscribe one or more mailboxes.
.\"------------------------------------------------------------------------
.SS mailbox unsubscribe
.B doveadm mailbox unsubscribe
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.IR mailbox\ ...
.PP
This command is used to unsubscribe one or more mailboxes.
.\"------------------------------------------------------------------------
.SS mailbox update
.B doveadm mailbox update
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP]
[\fB\-S\fP \fIsocket_path\fP]
[\fB\--mailbox-guid\fP \fIguid\fP]
[\fB\--uid-validity\fP \fIuid\fP]
[\fB\--min-next-uid\fP \fIuid\fP]
[\fB\--min-first-recent-uid\fP \fIuid\fP]
[\fB\--min-highest-modseq\fP \fIseq\fP]
[\fB\--min-highest-pvt-modseq\fP \fIseq\fP]
.IR mailbox\ ...
.PP
This command is used to set UID validity, next UID, first recent UID and modification sequence values.
.PP
Usually this is only ever to be used during migration, or restoring mailbox after disaster.
Settings these values is highly discouraged, and is not supported for all mail backends.
.\"------------------------------------------------------------------------
.SS mailbox cache purge
.B doveadm mailbox cache purge
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.IR mailbox\ ...
.PP
Purge the dovecot.index.cache file. Most importantly this frees up disk space
from mails that were already deleted. Normally there i no need to run this
command manually, because the compression is also run automatically.
.\"------------------------------------------------------------------------
.SS mailbox cache decision
.B doveadm mailbox cache decision
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
[\fB\--all\fP]
[\fB\--fields\fP \fIlist of fields\fP]
[\fB\--last-used\fP \fIunix timestamp\fP]
[\fB\--decision\fP \fIno|temp|yes\fP]
.IR mailbox\ ...
.PP
This command is used to list or change caching decisions for field(s) in mailbox(es).
You can list decisions by leaving out decision and last-used parameters.
.PP
.\"-------------------------------------
.TP
.B \--all
List or change all fields.
.\"-------------------------------------
.TP
.B \--fields
List or change these comma/space separated fields.
.\"-------------------------------------
.TP
.B \--decision
Set field caching decision. Yes means it's always cached.
Temp means it's provisionally cached.
No means the field is not cached.
.\"-------------------------------------
.TP
.B \--last-used
Set field's last used timestamp.
.\"-------------------------------------
.RE
.PP
NOTE. This command cannot be used to add new fields to cache! \
You need to first add them to configuration. \
Setting caching to no will not immediately drop field from cache, \
it will stop adding the field to cache.
.\"------------------------------------------------------------------------
.SS mailbox cache remove
.B doveadm mailbox cache remove
[\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
[\fB\-S\fP \fIsocket_path\fP]
.IR search query
.PP
Remove any matching mail(s) from cache.
.PP
WARNING! This command can erase ALL cached data, causing system slowness.
.\"------------------------------------------------------------------------
.SH EXAMPLE
List subscribed mailboxes, beginning with \(aqdovecot\(aq, of user bob.
.sp
.nf
.ft B
doveadm mailbox list \-s \-u bob dovecot*
.ft P
dovecot
dovecot/pigeonhole
dovecot/pigeonhole/2.0
.fi
.\"-------------------------------------
.PP
Now have a look at the status of user bob\(aqs dovecot mailboxes.
.sp
.nf
.ft B
doveadm \-f table mailbox status \-u bob \(dqmessages vsize\(dq dovecot*
.ft P
mailbox messages vsize
dovecot 20501 93968492
dovecot/pigeonhole 0 0
dovecot/pigeonhole/2.0 47 323474
.fi
.\"-------------------------------------
.PP
Converting an internationalized mailbox name from mUTF\-7 to UTF\-8 and
vice versa.
.sp
.nf
.ft B
doveadm mailbox mutf7 \-7 \(dq~peter/mail/&U,BTFw\-/&ZeVnLIqe\-\(dq
.ft P
~peter/mail/台北/日本語
.ft B
doveadm mailbox mutf7 ~peter/mail/台北/日本語
.ft P
~peter/mail/&U,BTFw\-/&ZeVnLIqe\-
.fi
.\"------------------------------------------------------------------------
@INCLUDE:reporting-bugs@
.\"------------------------------------------------------------------------
.SH SEE ALSO
.BR doveadm (1)
.BR doveadm-search-query (7)
.BR doveadm-mailbox-cryptokey(1)
|