Screaming Eagle wrote: > I have this in local.cf <http://local.cf> file: > describe BL_COUNTRY_VN_1 Mail client in Vietnam > header BL_COUNTRY_VN_1 eval:check_rbl('vietnam', > 'vn.countries.nerd.dk <http://vn.countries.nerd.dk>') > score BL_COUNTRY_VN_1 8.0 > tflags BL_COUNTRY_VN_1 net > > Whis is it not working? I get an email from Vietname, and the score is 0. Well, at casual glance, the rule looks ok, although it would be more standard to have the header line first and the describe line second. However, that shouldn't be a problem...
Did you run spamassassin --lint to make sure there's no config typos? Do you use spamd? If so, did you restart it? (local.cf is only parsed at spamd startup time) Have you verified that the IP in question is in fact listed by vn.countries.nerd.dk? (note that countries.nerd.dk is NOT perfect, and will not list each and every IP in a country) Are you using a lot of lists all on countries.nerd.dk? If so, I'll warn you that in my experience with blackholes.us, bombarding a site with many queries will generally cause only the first few lists to actually work. The rest of the queries get dropped. Why are you using a DNSBL for this anyway? Why not use the RelayCountry plugin that comes with SA 3.0.0 and higher? If you install IP::Country and enable the RelayCountry plugin, this can all run very fast with reasonable accuracy.. then you can make rules like this: header RELAY_CN X-Relay-Countries=~/\bCN\b/ describe RELAY_CN Relayed through china score RELAY_CN 1.0 All with no network-test overhead.