From: Tom Hughes Date: Tue, 29 Nov 2016 13:40:45 +0000 (+0000) Subject: Block spammy emails X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/5e24e241c48aae55fe5a81b73a832922ae700824 Block spammy emails There is a vast torrent of spam with headers of this form: X-PHP-Originating-Script: :SendMail.class.php X-PHP-Originating-Script: :ExtendedMail.class.php --- diff --git a/cookbooks/exim/templates/default/exim4.conf.erb b/cookbooks/exim/templates/default/exim4.conf.erb index 5766cd2f1..f37dad240 100644 --- a/cookbooks/exim/templates/default/exim4.conf.erb +++ b/cookbooks/exim/templates/default/exim4.conf.erb @@ -503,6 +503,12 @@ acl_check_data: message = This message scored $spam_score SpamAssassin points. <% end -%> + # Deny spammy messages with headers of the form: + # X-PHP-Originating-Script: :SendMail.class.php + # X-PHP-Originating-Script: :ExtendedMail.class.php + deny condition = ${if match {$h_X-PHP-Originating-Script:}{^[0-9]+:(Send|Extended)Mail\\.class\\.php\$}} + message = This message failed local spam checks. + # Accept the message. accept