chiark / gitweb /
spam.m4: Defer messages if SpamAssassin isn't working. master
authorMark Wooding <mdw@distorted.org.uk>
Fri, 27 Sep 2024 08:27:47 +0000 (09:27 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 27 Sep 2024 08:27:47 +0000 (09:27 +0100)
spam.m4

diff --git a/spam.m4 b/spam.m4
index 4570210930834f4296b70361d6b0f02825bc9dd6..07206bc77aa9da4bc08b627a00521d28b0f2eeb6 100644 (file)
--- a/spam.m4
+++ b/spam.m4
@@ -162,6 +162,12 @@ data_spam:
        ## Check the message for spam, comparing to the configured limit.
        warn     spam = exim:true
 
+       ## That won't actually do anything if the SpamAssassin server failed
+       ## for some reason.  Check that the reported score is not completely
+       ## empty.
+       defer    message = "Spam checking server offline: try again soon"
+                condition = ${if eq{$spam_score}{}}
+
        ## Format some reporting stuff.
        warn