X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=etc%2Fexim4%2Fconf.d%2Facl%2F40_exim4-config_check_data;h=a1b7024cec9ce32af61b3b10b2ba4577504e25bf;hb=712074091c34cbd445c4ba823d0d6d63a31557d2;hp=b9765c565d47ec2cdd178984c911eec97be32bb1;hpb=8b0378cbe7f114688e07cf44b848bc847b70a79b;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/etc/exim4/conf.d/acl/40_exim4-config_check_data b/etc/exim4/conf.d/acl/40_exim4-config_check_data index b9765c5..a1b7024 100644 --- a/etc/exim4/conf.d/acl/40_exim4-config_check_data +++ b/etc/exim4/conf.d/acl/40_exim4-config_check_data @@ -22,6 +22,26 @@ acl_check_data: message = No verifiable sender address in message headers !verify = header_sender + # Mark messages with their spamscore and deny messages with a very high + # score. + deny + message = Message was classified as spam + # Only scan messages that are small, since spam is hardly ever big (and + # scanning big messages costs lots of resources + condition = ${if <{$message_size}{80k}} + # Check using spamassasin, running as the "spamd" user. + # This condition will always succeed, since spam assassin is configured + # with a very low (even negative) threshold. + spam = spamd + # Add spam headers (these will be added even when the next condition fails + # and the message is not denied). + add_header = X-Spam-Score: $spam_score ($spam_bar) + add_header = X-Spam-Report: $spam_report + # Reject any messages with a spam score of more than 20 ($spam_score_int is + # $spam_score * 10). This is fairly high, but we don't like really + # rejecting messages. + condition = ${if >{$spam_score_int}{200}} + # accept otherwise accept