From 7e741d3584cacd46516acdb36270bd50c54452d1 Mon Sep 17 00:00:00 2001 From: nevart Date: Mon, 30 Sep 2024 17:51:23 +0000 Subject: [PATCH] Support ASN lookup --- templates/spamassassin/local.cf.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/spamassassin/local.cf.j2 b/templates/spamassassin/local.cf.j2 index 55983fc..519c74d 100644 --- a/templates/spamassassin/local.cf.j2 +++ b/templates/spamassassin/local.cf.j2 @@ -33,6 +33,9 @@ report_safe {{ spamassassin_report_safe }} clear_headers +#X-Spam-ASN: AS24940 213.239.192.0/18 +add_header all ASN _ASN_ + #X-Spam-Checker-Version: SpamAssassin 1.188-2003-05-24-exp on machine.example.org add_header all Checker-Version SpamAssassin _VERSION_ on _HOSTNAME_ @@ -76,6 +79,13 @@ lock_method {{ spamassassin_lock_method }} # required_score 5.0 required_score {{ spamassassin_required_score }} +# ASN - Look up the Autonomous System Number of the connecting IP +# and create a header containing ASN data for bayes tokenization. +# https://spamassassin.apache.org/full/4.0.x/doc/Mail_SpamAssassin_Plugin_ASN.html +loadplugin Mail::SpamAssassin::Plugin::ASN +asn_prefer_geodb 1 +asn_use_geodb 1 +asn_use_dns 0 # Use Bayesian classifier (default: 1) #