From 0cbdf465e49e4bc6a4625d0610fa73f9b469a39d Mon Sep 17 00:00:00 2001 From: euxane Date: Mon, 19 May 2025 16:36:50 +0200 Subject: [PATCH] dovecot/fts: warn on stopwords filter with multiple languages --- mail-server/dovecot.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mail-server/dovecot.nix b/mail-server/dovecot.nix index ee8db25..56cebf2 100644 --- a/mail-server/dovecot.nix +++ b/mail-server/dovecot.nix @@ -153,6 +153,20 @@ in } ]; + warnings = + (lib.optional ( + (builtins.length cfg.fullTextSearch.languages > 1) && + (builtins.elem "stopwords" cfg.fullTextSearch.filters) + ) '' + Using stopwords in `mailserver.fullTextSearch.filters` with multiple + languages in `mailserver.fullTextSearch.languages` configured WILL + cause some searches to fail. + + The recommended solution is to NOT use the stopword filter when + multiple languages are present in the configuration. + '') + ; + # for sieve-test. Shelling it in on demand usually doesnt' work, as it reads # the global config and tries to open shared libraries configured in there, # which are usually not compatible.