Peter Matulis wrote:
> I am having trouble scoring by country.
>
> I have set up local.cf like so:
>
>   
Personally, I'd suggest using the RelayCountry plugin for this. It's
DNS-free.

1) install IP::Country (via cpan or whatever)
2) edit init.pre to cause RelayCountry to be loaded.

3) add rules like these to local.cf:

header RELAY_CN X-Relay-Countries=~/\bCN\b/
describe RELAY_CN       Relayed through china
score RELAY_CN 1.0


header RELAY_KR X-Relay-Countries=~/\bKR\b/
describe RELAY_KR       Relayed through Korea
score RELAY_KR 1.0

Note that the "X-Relay-Countries" header is by default a pseudo header
that isn't actually added to the message, but can be matched by rules
and used by bayes.

See also:

Docs for Relay Country
http://spamassassin.apache.org/full/3.1.x/dist/doc/Mail_SpamAssassin_Plugin_RelayCountry.html

Docs for IP::Country
http://www.annocpan.org/~NWETTERS/IP-Country-2.22/lib/IP/Country.pm

List of ISO 3166 2-character country codes
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2





Reply via email to