This plugin requires the Perl Module GeoIP2::Database::Reader.
The RelayCountry plugin attempts to determine the domain country codes of each relay used in the delivery path of messages and add that information to the message metadata as the "X-Relay-Countries" header, or the _RELAYCOUNTRY_ markup. This will add country-based metadata to the Bayesian filtering process, allowing the Bayesian filters to learn information based on countries. Private IPs are marked with ** (two asterisks) and IPs not found in the database are marked with XX.
For each relay in the message's Received: chain, the plugin looks up the relay's country code in the GeoIP database and records the results in the X-Relay-Countries header / _RELAYCOUNTRY_ markup. If a message is relayed through any of the countries listed in relaycountry_bad_countries, the RELAYCOUNTRY_BAD rule fires (scored with relaycountry_bad_score); if it is relayed through any of the countries in relaycountry_good_countries, the RELAYCOUNTRY_GOOD rule fires (scored with relaycountry_good_score).
_RELAYCOUNTRY_ - All untrusted relays, starting from the trusted_networks border._RELAYCOUNTRYEXT_ - All external relays, starting from the internal_networks border._RELAYCOUNTRYALL_ - All possible relays (internal + external)._RELAYCOUNTRYAUTH_ - All relays starting from the first relay that used authentication.| Area | Rule name | Description | Default scores |
|---|---|---|---|
| header | RELAYCOUNTRY_BAD |
relay server in the list of bad countries | 3.25 |
| header | RELAYCOUNTRY_GOOD |
relay server in the list of good countries | -0.5 |