Search K
Appearance
Appearance
doveadm [GLOBAL OPTIONS] metacache command [arguments]
doveadm metacache can be used to run actions that interact with and modify Dovecot's local metacache storage.
Global doveadm(1)
options:
Enables verbosity and debug messages.
Do not read any config file, just use defaults. The dovecot_storage_version
defaults to the latest version, but can be overridden with -o.
Preserve entire environment for doveadm, not just import_environment
.
Enables verbosity, including progress counter.
If using multiple Dovecot instances, choose the config file based on this instance name.
See instance_name
for more information.
Read configuration from the given config-file. By default it first reads config socket, and then falls back to /etc/dovecot/dovecot.conf. You can also point this to config socket of some instance running compatible version.
Overrides the configuration setting from /etc/dovecot/dovecot.conf and from the userdb with the given value. In order to override multiple settings, the -o option may be specified multiple times.
Specifies the formatter for formatting the output. Supported formatters are:
If the -A option is present, the command will be performed for all users. Using this option in combination with system users from userdb { driver = passwd } is not recommended, because it contains also users with a lower UID than the one configured with the first_valid_uid
setting.
When the SQL userdb module is used, make sure that the userdb_sql_iterate_query
setting matches your database layout.
When using the LDAP userdb module, make sure that the userdb_fields
and userdb_ldap_iterate_fields
settings match your LDAP schema. Otherwise doveadm(1)
will be unable to iterate over all users.
Execute the command for all the users in the file. This is similar to the -A option, but instead of getting the list of users from the userdb, they are read from the given file. The file contains one username per line.
Do not perform userdb lookup. Use the USER
environment variable to specify the username.
The option's argument is either an absolute path to a local UNIX domain socket, or a hostname and port (hostname:port), in order to connect a remote host via a TCP socket.
This allows an administrator to execute doveadm(1)
mail commands through the given socket.
Run the command only for the given user. It's also possible to use '*' and '?' wildcards (e.g. -u *@example.org).
There are 4 priorities for index files:
User root indexes (highest priority)
FTS indexes
INBOX and \Junk folder indexes
other folders' indexes (lowest priority)
doveadm [GLOBAL OPTIONS] metacache clean [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [-d days] [-p min_priority] [namespace]
Cleans old indexes for given users. If the indexes have not been flushed yet this command will fail.
doveadm [GLOBAL OPTIONS] metacache flush [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [-p min_priority] [-i] [namespace]
Flushes metacache to storage for the given user(s).
doveadm [GLOBAL OPTIONS] metacache flushall [-a metacache_socket_path] [-f userdb_field] [-i] [user mask]
Flush all matching users to storage. If no mask is specified, everything is flushed.
WARNING
This can be an expensive and long operation.
doveadm [GLOBAL OPTIONS] metacache list [ -a metacache_socket_path ] [ -f userdb_field ] [ -W ] [ --keyvalues ] [ user mask ]
List current metacache for matching users. If no mask is specified, lists all users' metacache.
If --keyvalues
is given, the matching users' key-value database is written.
Otherwise, output will contain
The primary username
Alternative usernames, if configured by returning user_* extra fields from userdb
This corresponds to the metacache_upload_interval setting.
Filesystem device where the user is located in. Filesystems are separately tracked by metacache, although currently support for multiple filesystems doesn't work as well as it could.
Disk space used by index files of this priority in metacache.
UNIX timestamp of when the index files of this priority were last accessed in metacache.
"none" means the index files have no changes done locally since they were downloaded. "unimportant" means there are some changes, but nothing that couldn't be regenerated if the server crashed. "important" means that there are changes that would be lost in case of a server crash. Currently the only important change is flag changes.
Last service that accessed this user. Note that metacache clean and flush operations (via metacache-worker or doveadm) won't update this field.
Currently calculated weight when these indexes are cleaned up. Smaller numbers are cleaned up before larger numbers. Sorting the list output (with |sort -n) by this field will show the order in which the indexes would be cleaned. The cleanup weights are recalculated whenever the indexes are being accessed.
doveadm [GLOBAL OPTIONS] metacache refresh [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [namespace]
Force refreshing metacache for the given user(s) the next time it's opened. The refresh is done for the user root index and all the folders.
doveadm [GLOBAL OPTIONS] metacache pull [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [--latest-only] [--clean] source_backend_host
Pull all metacache for given user(s) from source backend host.
doveadm [GLOBAL OPTIONS] metacache remove [-a metacache_socket_path] user mask
Remove metacache for matching users from metacache process. Mask is required parameter.
doveadm [GLOBAL OPTIONS] metacache rescan [-a metacache_socket_path] [<root dirs>]
Triggers an explicit metacache rescan, which makes sure the disk space usage tracked by metacache process matches what really exists on filesystem.
doveadm [GLOBAL OPTIONS] metacache status [-a metacache_socket_path] [--roots | --oldest-safe-timestamp] [-b]
Print statistics about metacache usage.
doveadm [GLOBAL OPTIONS] metacache update userdb [-a metacache_socket_path] username userdb_field value
Update alternative usernames (user_* fields) in doveadm metacache list output.
doveadm [GLOBAL OPTIONS] metacache unpack [--bundle-name bundle_name] bundle_file destination_dir
Unpack given bundle from storage to a given directory.
doveadm metacache flush -u user@domain
Report bugs, including doveconf -n output, to the Dovecot Mailing List dovecot@dovecot.org. Information about reporting bugs is available at: https://dovecot.org/bugreport.html