Don't reject spam messages from a few trusted hosts.
[matthijs/servers/drsnuggles.git] / etc / exim4 / conf.d / acl / 40_exim4-config_check_data
index a6f5a50dc2419a2e9aa63cb9459326c6e407964f..fbaacfa0b7a59ed0b5bcfbb6dec3c85fdb74f5d8 100644 (file)
@@ -18,7 +18,7 @@ acl_check_data:
   # Don't spamcheck big messages
   accept
     condition = ${if >{$message_size}{80k}}
-    add_header = X-Spam-Report: Message too big, not scanned.
+    add_header = X-Spam-Score: Message too big, not scanned.
 
   # Deny messages with a large spamscore. The threshold is set by
   # spamassassin, see required_score in /etc/spamassassin/local.cf
@@ -26,6 +26,10 @@ acl_check_data:
     message = Message was classified as spam
     # Check using spamassasin, running as the "spamd" user.
     spam = spamd
+    # Don't reject to some trusted hosts, since they will only generate
+    # useless delivery failures to innocent people. We check this after the
+    # spamcheck, so the next rule can still the spam headers properly.
+    !hosts = +dont_reject_spam_hosts
 
   # Accept any other messages, but add spam headers.
   accept