Skip to content

Commit

Permalink
Merge pull request #57 from systemli/support-asn-lookup
Browse files Browse the repository at this point in the history
Support ASN lookup
  • Loading branch information
nevart authored Sep 30, 2024
2 parents 96b5be5 + 7e741d3 commit d3d1bc7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions templates/spamassassin/local.cf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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_

Expand Down Expand Up @@ -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)
#
Expand Down

0 comments on commit d3d1bc7

Please sign in to comment.