From f8a9228baa4f68c7639ef703e15f97bf146c53ee Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 13 Nov 2025 22:45:18 +0100 Subject: ... --- hosts/surtr/email/default.nix | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'hosts/surtr') diff --git a/hosts/surtr/email/default.nix b/hosts/surtr/email/default.nix index b4b2b5c8..c09e1511 100644 --- a/hosts/surtr/email/default.nix +++ b/hosts/surtr/email/default.nix @@ -539,7 +539,7 @@ in { users.groups.${config.services.redis.servers.rspamd.user}.members = [ config.services.rspamd.user ]; - environment.systemPackages = with pkgs; [ dovecot_pigeonhole dovecot_fts_xapian ]; + environment.systemPackages = with pkgs; [ dovecot_pigeonhole dovecot-fts-flatcurve ]; services.dovecot2 = { enable = true; enablePAM = false; @@ -547,7 +547,7 @@ in { sslServerKey = "/run/credentials/dovecot.service/surtr.yggdrasil.li.key.pem"; sslCACert = toString ./ca/ca.crt; mailLocation = "maildir:/var/lib/mail/%u/maildir:UTF-8:INDEX=/var/lib/dovecot/indices/%u"; - mailPlugins.globally.enable = [ "fts" "fts_xapian" ]; + mailPlugins.globally.enable = [ "fts" "fts_flatcurve" ]; protocols = [ "lmtp" "sieve" ]; sieve = { extensions = ["copy" "imapsieve" "variables" "imap4flags" "vacation" "vacation-seconds" "vnd.dovecot.debug"]; @@ -726,13 +726,10 @@ in { } plugin { - plugin = fts fts_xapian - fts = xapian - fts_xapian = partial=3 full=20 attachments=1 verbose=1 + plugin = fts fts_flatcurve + fts = yes fts_autoindex = yes - - fts_enforced = no } service indexer-worker { @@ -741,30 +738,6 @@ in { ''; }; - systemd.services.dovecot-fts-xapian-optimize = { - description = "Optimize dovecot indices for fts_xapian"; - requisite = [ "dovecot.service" ]; - after = [ "dovecot.service" ]; - startAt = "*-*-* 22:00:00 Europe/Berlin"; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${getExe' pkgs.dovecot "doveadm"} fts optimize -A"; - PrivateDevices = true; - PrivateNetwork = true; - ProtectKernelTunables = true; - ProtectKernelModules = true; - ProtectControlGroups = true; - ProtectHome = true; - ProtectSystem = true; - PrivateTmp = true; - }; - }; - systemd.timers.dovecot-fts-xapian-optimize = { - timerConfig = { - RandomizedDelaySec = 4 * 3600; - }; - }; - environment.etc = { "dovecot/sieve_before.d/tag-junk.sieve".text = '' require ["imap4flags"]; -- cgit v1.2.3