DOVEADM-REBUILD(1)
π DOVEADM-REBUILD(1) β bestie edition π
okay so this is doveadm-rebuild, from the Dovecot manual, and she's here to rebuild stuff. Sit down, grab a boba, we're doing this. π§
β¨ NAME β¨
doveadm-rebuild β commands related to rebuilding various aspects of mails matching a given search query. rebuild era π
πΈ SYNOPSIS πΈ
doveadm [GLOBAL OPTIONS] [-f formatter] rebuild <command> [-S
socket_path] -A search_query
doveadm [GLOBAL OPTIONS] [-f formatter] rebuild <command> [-S
socket_path] -F file search_query
doveadm [GLOBAL OPTIONS] [-f formatter] rebuild <command> [-S
socket_path] --no-userdb-lookup search_query
doveadm [GLOBAL OPTIONS] [-f formatter] rebuild <command> [-S
socket_path] -u user search_query
π¦ DESCRIPTION π¦
rebuild attachments is the command, and what it does is rebuild attachment presence. That's the whole vibe. And doveadm(1) will print the message's uid for every single match. π
When you use it with the -A or -u wildcard options, doveadm(1) prints the fields username and uid for each matching message instead. Not me getting extra fields... π
Okay so the four forms, bestie, in order:
- In the first form,
doveadm(1)will execute the rebuild action for all users. everybody. the whole group chat. π - In the second form, the command is performed for all users listed in the given file. π
- In the third form, it's performed for the user contained in the
USERenvironment variable. π± - In the last form, only matching mails of the given user(s) will be rebuilt. π―
β GLOBAL OPTIONS β
These are the global doveadm(1) options, and yes, you need them:
-Dβ enables verbosity and debug messages. the receipts π-Oβ do not read any config file, just use defaults. Thedovecot_storage_versionsetting defaults to the latest version, but you can override it with-o. no config, no problems? (it's giving chaos but okay π)-kβ preserve the entire environment fordoveadm, not just theimport_environmentsetting. main character energy, keep your whole vibe.-vβ enables verbosity, including a progress counter. we love a progress bar π«Ά-i instance-nameβ if you're running multiple Dovecot instances, pick the config file based on this instance name. See theinstance_namesetting for more info. π-c config-fileβ read configuration from the given config-file. By default it first reads the config socket, and then falls back to/etc/dovecot/dovecot.conf. You can also point this to the config socket of some instance running a compatible version. π-o setting=valueβ overrides the configuration setting from/etc/dovecot/dovecot.confand from the userdb with the given value. To override multiple settings, you can specify the-ooption multiple times. stack 'em. β¨-f formatterβ specifies the formatter for formatting the output. The supported formatters are:flowβ prints each line withkey=valuepairs.jsonβ prints a JSON array of JSON objects.pagerβ prints eachkey: valuepair on its own line and separates records with a form feed character (^L).tabβ prints a table header followed by tab separated value lines.tableβ prints a table header followed by adjusted value lines.
This command uses by default the output formatter flow (without the key= prefix). no cap. π
π OPTIONS π
-Aβ if the-Aoption is present, the command will be performed for all users. Using this option in combination with system users fromuserdb { driver = passwd }is not recommended, because it contains also users with a lower UID than the one configured with thefirst_valid_uidsetting. β οΈ When the SQL userdb module is used, make sure that theuserdb_sql_iterate_querysetting matches your database layout. When using the LDAP userdb module, make sure that theuserdb_fieldssetting and theuserdb_ldap_iterate_fieldssetting match your LDAP schema. Otherwisedoveadm(1)will be unable to iterate over all users. π-F fileβ execute the command for all the users in the file. This is similar to the-Aoption, but instead of getting the list of users from the userdb, they're read from the given file. The file contains one username per line. π--no-userdb-lookupβ do not perform userdb lookup. Use theUSERenvironment variable to specify the username. π-S socket_pathβ 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 to a remote host via a TCP socket. This allows an administrator to executedoveadm(1)mail commands through the given socket. π-u user/maskβ run the command only for the given user. It's also possible to use'*'and'?'wildcards (e.g.-u *@example.org). wildcard slay. π«
π ARGUMENTS π
search_queryβ resets the attachment indicator for messages matching this search query. Seedoveadm-search-query(7)for the details. π
π EXAMPLE π
Rebuild user bob's attachment status:
doveadm rebuild attachments -u bob ALL
1
2
3
look at those uids go π
π«Ά REPORTING BUGS π«Ά
Found a bug? Bestie, report it β including your doveconf -n output β to the Dovecot Mailing List β¨dovecot@dovecot.orgβ©. Info about reporting bugs lives at: β¨https://dovecot.org/bugreport.htmlβ© π
π₯ SEE ALSO π₯
and that's the whole page, bestie β go rebuild something iconic. β¨
signing off: this was f979264, from April 2026, and it's the DOVEADM-REBUILD(1) girlies' era. π
π
π¦ where this page comes from
- alpine 3.23: dovecot-doc 2.4.5-r0 Β· MIT AND LGPL-2.1-or-later
- alpine 3.24: dovecot-doc 2.4.5-r0 Β· MIT AND LGPL-2.1-or-later
- arch rolling: dovecot 2.4.5-1 Β· MIT AND LGPL-2.1-only
- fedora 43: dovecot 1:2.4.5-1.fc43 Β· MIT AND LGPL-2.1-only
- fedora 44: dovecot 1:2.4.5-1.fc44 Β· MIT AND LGPL-2.1-only
- nixos 26.05: dovecot 2.4.5
- nixpkgs unstable: dovecot 2.4.5
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms