exim: Correct spam rejection threshold.
[matthijs/servers/drsnuggles.git] / etc / exim4 / conf.d / acl / 40_exim4-config_check_data
1
2 ### acl/40_exim4-config_check_data
3 #################################
4
5 # This ACL is used after the contents of a message have been received. This
6 # is the ACL in which you can test a message's headers or body, and in
7 # particular, this is where you can invoke external virus or spam scanners.
8
9 acl_check_data:
10
11   # Deny unless the address list headers are syntactically correct.
12   #
13   # This might reject legitimate mail...
14   deny
15     message = Message headers fail syntax check
16     !verify = header_syntax
17
18
19   # require that there is a verifiable sender address in at least
20   # one of the "Sender:", "Reply-To:", or "From:" header lines.
21   deny
22     message = No verifiable sender address in message headers
23     !verify = header_sender
24
25   # Mark messages with their spamscore and deny messages with a very high
26   # score.
27   deny
28     message = Message was classified as spam
29     # Only scan messages that are small, since spam is hardly ever big (and
30     # scanning big messages costs lots of resources
31     condition = ${if <{$message_size}{80k}}
32     # Check using spamassasin's default profile (the name "default" should just
33     # be any non-existing profile to get the default configuration). This
34     # condition will always succeed, since spam assassin is configured with a
35     # very low (even negative) threshold.
36     spam = default
37     # Add spam headers (these will be added even when the next condition fails
38     # and the message is not denied).
39     add_header = X-Spam-Score: $spam_score ($spam_bar)
40     add_header = X-Spam-Report: $spam_report
41     # Reject any messages with a spam score of more than 20 ($spam_score_int is
42     # $spam_score * 10). This is fairly high, but we don't like really
43     # rejecting messages.
44     condition = ${if >{$spam_score_int}{200}}
45
46   # accept otherwise
47   accept
48
49 # vim: set sts=2 expandtab sw=2 ai: