DOVEADM-INDEX(1)
π DOVEADM-INDEX π
okay bestie, gather round, because we're talking about doveadm-index from the Dovecot manual, and honestly? it's giving β¨housekeepingβ¨. this is the page that tells you how to make Dovecot index your mailboxes. no cap. let's get into it π«Ά
πΈ NAME πΈ
doveadm-index β index mailboxes. that's it, that's the vibe. short, sweet, iconic π
β¨ SYNOPSIS β¨
there's four ways to summon this thing, depending on who you're indexing for. all of them start with doveadm [GLOBAL OPTIONS] index:
doveadm [GLOBAL OPTIONS] index [-S socket_path] -A [-q] [-n max_recent]
mailbox
doveadm [GLOBAL OPTIONS] index [-S socket_path] -F file [-q] [-n
max_recent] mailbox
doveadm [GLOBAL OPTIONS] index [-S socket_path] --no-userdb-lookup [-q]
[-n max_recent] mailbox
doveadm [GLOBAL OPTIONS] index [-S socket_path] -u user [-q] [-n
max_recent] mailbox
like, pick your fighter: everyone (-A), a file full of people (-F), no userdb lookup at all (--no-userdb-lookup), or just one special user (-u user) π
π¦ DESCRIPTION π¦
so what does it actually do? it takes the unindexed messages in a mailbox and adds them into the index/cache file. and if full text search is turned on, it also adds those unindexed messages to the fts database. slay.
now here's the tea β β the caching only adds the fields that were previously added to the mailbox's caching decisions. so if the user's client has never even touched that mailbox, this command won't do anything useful for it. sorry bestie, that's just how it is π
you can peek at a specific mailbox's current caching decisions with the doveadm dump command. very demure, very mindful.
and plot twist β messages can also be added automatically to the full text search index using:
fts_autoindex = yes
π GLOBAL OPTIONS π
these are the global doveadm(1) options, aka the ones that apply to the whole vibe:
-Dβ enables verbosity and debug messages. more words, more info, more chaos π₯-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.-kβ preserve the entire environment fordoveadm, not just theimport_environmentsetting.-vβ enables verbosity, including a progress counter. watching that number go up is oddly satisfying ngl π-iinstance-name β if you're running multiple Dovecot instances, this picks the config file based on this instance name. see theinstance_namesetting for more info.-cconfig-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 at the config socket of some instance running a compatible version.-osetting=value β overrides the configuration setting from/etc/dovecot/dovecot.confand from the userdb with the given value. and because one override is never enough, you can specify-omultiple times π
π OPTIONS π
okay this is the main character section. buckle up:
-Aβ if the-Aoption is present, the command will be performed for all users. > β οΈ using this with system users fromuserdb { driver = passwd }is not recommended, because that also contains users with a lower UID than the one configured with thefirst_valid_uidsetting. be careful, bestie.
when the SQL userdb module is used, make sure the userdb_sql_iterate_query setting setting matches your database layout. (yes, "setting setting" β that's what it says, no I will not be fixing it π)
when using the LDAP userdb module, make sure the userdb_fields setting and userdb_ldap_iterate_fields setting settings match your LDAP schema. otherwise doveadm(1) will be unable to iterate over all users. and that's a whole mess we don't want π
-Ffile β execute the command for all the users in the file. this is similar to the-Aoption, except instead of getting the list of users from the userdb, they're read from the given file. the file contains one username per line. simple. clean. iconic β¨-nmax_recent β an integer value, which specifies the maximum number of\Recentmessages in mailboxes. if the mailbox contains more than max_recent messages with the\Recentflag set, the mailbox will not be indexed. this can be useful to avoid unnecessary indexing for large mailboxes that are never opened. lowkey genius π§--no-userdb-lookupβ do not perform userdb lookup. use theUSERenvironment variable to specify the username. DIY energy fr fr-qβ queues the indexing to be run by the indexer process. without-q, the indexing is done directly by thedoveadm(1)process. some drivers can't handle multiple processes updating the indexes simultaneously, so-qshould usually be used on production. > π₯ production bestie: use-q. that's not a suggestion, that's a lifestyle.-Ssocket_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 a remote host via a TCP socket.
this allows an administrator to execute doveadm(1) mail commands through the given socket. remote chaos unlocked π
-uuser/mask β run the command only for the given user. it's also possible to use'*'and'?'wildcards (e.g.-u *@example.org). wildcard queen behavior π
π ARGUMENTS π
- mailbox β the name of the mailbox to index. just the name, bestie, nothing fancy.
β EXAMPLE β
want to index bob's INBOX? say less:
doveadm index -u bob INBOX
and that's it. bob's INBOX is indexed. we love to see it π«Ά
π REPORTING BUGS π
found a bug? first of all, my condolences. 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β©
don't forget the doveconf -n output, they will literally ask for it π
π SEE ALSO π
the whole family, iykyk π
and that's the whole page, bestie!! this absolute icon of a manual page comes to you from Dovecot, revision f979264, dated April 2026. go forth and index responsibly. mwah πβ¨πΈ
π¦ 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