From cc625c968dfbc783d8f871da7e2b61f1372dd3f7 Mon Sep 17 00:00:00 2001 From: Philipp Kern Date: Sun, 3 Jan 2021 16:43:56 +0100 Subject: [PATCH] nixos/spamassassin: Run sa-compile after updating the rules sa-compile speeds up processing the rules by compiling them from Perl to C. This needs to be run after every update and is saved in the local state directory by Perl and SpamAssassin version. --- nixos/modules/services/mail/spamassassin.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/mail/spamassassin.nix b/nixos/modules/services/mail/spamassassin.nix index 98d9e925dcd..036f1bfebd3 100644 --- a/nixos/modules/services/mail/spamassassin.nix +++ b/nixos/modules/services/mail/spamassassin.nix @@ -135,7 +135,10 @@ in User = "spamd"; Group = "spamd"; StateDirectory = "spamassassin"; - ExecStart = "${pkgs.spamassassin}/bin/sa-update --verbose --gpghomedir=%S/spamassassin/sa-update-keys/"; + ExecStart = [ + "${pkgs.spamassassin}/bin/sa-update --verbose --gpghomedir=%S/spamassassin/sa-update-keys/" + "${pkgs.spamassassin}/bin/sa-compile" + ]; ExecStartPost = "+${pkgs.systemd}/bin/systemctl -q --no-block try-reload-or-restart spamd.service"; SuccessExitStatus = "1"; };