message = Message headers fail syntax check
!verify = header_syntax
+ # Don't spamcheck big messages
+ accept
+ condition = ${if >{$message_size}{80k}}
+ add_header = X-Spam-Score: Message too big, not scanned.
- # require that there is a verifiable sender address in at least
- # one of the "Sender:", "Reply-To:", or "From:" header lines.
+ # Deny messages with a large spamscore. The threshold is set by
+ # spamassassin, see required_score in /etc/spamassassin/local.cf
deny
- message = No verifiable sender address in message headers
- !verify = header_sender
-
- # accept otherwise
+ 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
+ add_header = X-Spam-Score: $spam_score ($spam_bar)
+ add_header = X-Spam-Report: $spam_report
# vim: set sts=2 expandtab sw=2 ai: