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.
This commit is contained in:
Philipp Kern 2021-01-03 16:43:56 +01:00
parent 4d4a0b7cca
commit cc625c968d

View File

@ -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";
};