Modify SpamAssassin config file to include GEO IP restrictions

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

Has anybody Modified the 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:
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Exec Consultant
Distinguished Expert 2018
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/ file.


Thanks btan,

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

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