mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Add Full Text Search capability to Dovecot. - Add 'dovecot-fts-xapian' to the list of packages for the email app. - Add relevant configs for both dovecot 2.3 and 2.4 - Add a systemd timer to periodically clean search indexes Configurations taken from plugin's upstream documentation: https://github.com/grosjo/fts-xapian Sunil: - Tweak the dovecot 2.4 configuration. Remove explicit configuration same as or close to default values. - Drop the timer service for cleaning up the index. Dovecot documentation that FTS plugins do it themselves. - Drop the re-indexing command on setup. This could not be properly tested. On first search, indexes will be created for mailboxes that don't have them. Tests done: - Perform a fresh install, on both Bookworm and Trixie, confirm the install is successful, confirm the systemd service runs with exit 0. - On Bookworm, apply the patches on an existing setup, confirm the patches apply as expected. - On a production like setup, set dovecot 2.4 to debug mode and check the journal logs while receiving an email: The logs confirm that the fts module is loaded and that it automatically creates a db for the indexes. I also opened the newly created db file with less and confirmed that the human readable parts contain my recent email. - Using Sogo, perform a full search (including headers and body). Search works and indexes are freshly created on all the folders. Signed-off-by: Benedek Nagy <contact@nbenedek.me> Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>