IMAP SEARCH BODY on Maildir is O(mailbox size). For users with 10k+ messages, it's brutal.
Solr backend turns body search into indexed lookups (<200 ms across 1M messages).
Install:
apt install dovecot-solr solr-tomcat
Configure in 90-plugin.conf:
mail_plugins = $mail_plugins fts fts_solr
plugin {
fts = solr
fts_solr = url=http://127.0.0.1:8983/solr/dovecot/
fts_autoindex = yes
fts_autoindex_exclude = \\Trash
}
Bulk index existing mailboxes:
doveadm fts rescan -A
Alternatives:
- Xapian — embedded, no Java, single-machine only. Use for <500 users.
- Manticore — newer Lucene fork, faster cold-cache. Less mature Dovecot support.
🎯 For most deployments under 100 mailboxes, you don't need FTS. Above that, it transforms search UX.
Sign in to keep track of what you have read.