Skip to content
Module 9 · Lesson 19 of 25

Full-text search with Solr

Part of Dovecot: IMAP/POP3 at Production Scale, in the Performance Tuning & Indexes module.

Author

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.

Pulse · email sending

Sending infrastructure that is yours alone.

Every domain gets its own MX host, IP, DKIM selector and certificate. Take it managed, and we run it for you, or buy a licence and run it on your own servers.

# on a fresh Ubuntu server
$ cd pulse && sudo ./install.sh
→ docker compose up · kumomta · stalwart · caddy
→ dashboard ready on https://pulse.yourdomain.com
$

Also from us:Beat: monitoring that tells you the fixConsulting: $65/hr, no retainer