summaryrefslogtreecommitdiff
path: root/spamassassin-courier/spamassassin-courier.install
diff options
context:
space:
mode:
Diffstat (limited to 'spamassassin-courier/spamassassin-courier.install')
-rw-r--r--spamassassin-courier/spamassassin-courier.install19
1 files changed, 19 insertions, 0 deletions
diff --git a/spamassassin-courier/spamassassin-courier.install b/spamassassin-courier/spamassassin-courier.install
new file mode 100644
index 00000000..65f14a06
--- /dev/null
+++ b/spamassassin-courier/spamassassin-courier.install
@@ -0,0 +1,19 @@
+post_install() {
+ echo "You must run 'sa-update' to install spam rules before use."
+}
+
+post_upgrade() {
+ if [ "$(vercmp $2 3.4)" -lt 0 ]; then
+ echo '/var/lib/spamassassin is now owned by the spamd user. spamassassin.service'
+ echo 'will also run under that user. You may need to adjust your setup.'
+ fi
+
+ # Compile rules, if rules have previously been compiled, and it's possible
+ if type re2c &>/dev/null && type sa-compile &>/dev/null && [[ -d /var/lib/spamassassin/compiled ]]; then
+ echo "Detected compiled rules, running sa-compile..."
+ sa-compile > /dev/null 2>&1
+ fi
+
+ true
+}
+