perl-IP-Country provides fast lookup of country codes from IP addresses. perl-IP-Country is recommended for spamassassin.