summaryrefslogtreecommitdiff
path: root/spamassassin-courier/spamassassin-update.service
diff options
context:
space:
mode:
Diffstat (limited to 'spamassassin-courier/spamassassin-update.service')
-rw-r--r--spamassassin-courier/spamassassin-update.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/spamassassin-courier/spamassassin-update.service b/spamassassin-courier/spamassassin-update.service
new file mode 100644
index 00000000..1d944a2d
--- /dev/null
+++ b/spamassassin-courier/spamassassin-update.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=spamassassin housekeeping stuff
+
+[Service]
+#User=spamd
+#Group=spamd
+Type=oneshot
+
+# remove --allowplugins, if you do not want plugin updates from SA.
+ExecStart=/bin/sh -c '/usr/bin/vendor_perl/sa-update --allowplugins && {\
+ /usr/bin/vendor_perl/sa-compile --quiet;\
+ /usr/bin/systemctl -q --no-block try-restart spamassassin.service; }'
+SuccessExitStatus=1
+
+# uncomment the following ExecStart line to train SA's bayes filter
+# and specify the path to the mailbox that contains spam email(s)
+#ExecStart=/usr/bin/vendor_perl/sa-learn --spam <path_to_your_spam_mailbox>