Modify SpamAssassin config file to include GEO IP restrictions

sj77
sj77 used Ask the Experts™
on
Dear E.E users,

Has anybody Modified the local.cf to include GEO-IP restrictions and if so cold you please assist helping me get this resolved to include this in my SpamAssassin config file.

Here are the two resources that I have found:

http://dev.maxmind.com/geoip/geoip2/geolite2/

https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Plugin_URILocalBL.html
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Exec Consultant
Distinguished Expert 2018
Commented:
Should reference this
The RelayCountry plugin exposes the countries that a mail was relayed from -- turn it on by reading that documentation page, installing the required CPAN module IP::Country::Fast, and uncommenting the 'loadplugin' line in the /etc/mail/spamassassin/init.pre file for Mail::SpamAssassin::Plugin::RelayCountry.

The RelayCountry plugin will add metadata to the Bayesian filtering process, allowing the Bayesian filters to learn information based on countries.

You can also write rules that match specific countries and add them to your /etc/mail/spamassassin/local.cf file.
https://wiki.apache.org/spamassassin/RelayCountryPlugin

Author

Commented:
Thanks btan,

Do you know of a place that gives you all the countries names very easily so I can populate the local.cf file?
btanExec Consultant
Distinguished Expert 2018
Commented:
I saw this list but may not necessary be updated as there is also other writing script to scrape wiki to keep updated.
https://gist.github.com/eparreno/205900

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial