NAME

RelayCountry - add message metadata indicating the country code of each relay

SYNOPSIS

loadplugin     Mail::SpamAssassin::Plugin::RelayCountry

DESCRIPTION

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.

Following metadata headers and tags are added:

X-Relay-Countries           _RELAYCOUNTRY_
  All untrusted relays. Contains all relays starting from the
  trusted_networks border. This method has been used by default since
  early SA versions.

X-Relay-Countries-External  _RELAYCOUNTRYEXT_
  All external relays. Contains all relays starting from the
  internal_networks border. Could be useful in some cases when
  trusted/msa_networks extend beyond the internal border and those
  need to be checked too.

X-Relay-Countries-All       _RELAYCOUNTRYALL_
  All possible relays (internal + external).

X-Relay-Countries-Auth      _RELAYCOUNTRYAUTH_
  Auth will contain all relays starting from the first relay that used
  authentication. For example, this could be used to check for hacked
  local users coming in from unexpected countries. If there are no
  authenticated relays, this will be empty.

REQUIREMENT

This plugin uses Mail::SpamAssassin::GeoDB and requires a module supported by it, for example MaxMind::DB::Reader (GeoIP2).