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.
wip/yesman
Philipp Kern 3 years ago
parent 4d4a0b7cca
commit cc625c968d
  1. 5
      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";
};

Loading…
Cancel
Save