You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Peter Matulis <pe...@yahoo.ca> on 2006/12/23 06:58:15 UTC

scoring by country

I am having trouble scoring by country.

I have set up local.cf like so:

header __RCVD_IN_NERDS eval:check_rbl('nerds','zz.countries.nerd.dk.')
describe __RCVD_IN_NERDS        Received from a spam country
tflags __RCVD_IN_NERDS          net

header RCVD_IN_NERDS_CN eval:check_rbl_sub('nerds','127.0.0.156')
describe RCVD_IN_NERDS_CN       Received from China
tflags RCVD_IN_NERDS_CN         net
score RCVD_IN_NERDS_CN          2.0

header RCVD_IN_NERDS_KR eval:check_rbl_sub('nerds','127.0.0.154')
describe RCVD_IN_NERDS_KR       Received from South Korea
tflags RCVD_IN_NERDS_KR         net
score RCVD_IN_NERDS_KR          2.0

But I do not get anything in my logs.

Also, http://countries.nerd.dk is down.

What are other people doing to score by the country the SMTP client
resides in?

Peter

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: scoring by country

Posted by Peter Matulis <pe...@yahoo.ca>.
--- Matt Kettler <mk...@verizon.net> wrote:

> Peter Matulis wrote:
> >
> > Thank you for this information.  However I configured according to
> >
> > http://wiki.apache.org/spamassassin/RelayCountryPlugin
> >
> > and I still do not get any rules kicking in.  I am in Canada and I
> have
> > scores of "0.0" for both Canada (CA) and United States (US).  Is
> there
> > a more defined way to test this plugin?
> >
> >   
> Well, CA and US will *NEVER* fire in that case.  Rules with a score
> of 0
> are completely disabled in SA, and they will not be evaluated at all.
> 
> Try setting them to 0.001 instead.

That did it.  Thank you very much.

Peter


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: scoring by country

Posted by Matt Kettler <mk...@verizon.net>.
Peter Matulis wrote:
>
> Thank you for this information.  However I configured according to
>
> http://wiki.apache.org/spamassassin/RelayCountryPlugin
>
> and I still do not get any rules kicking in.  I am in Canada and I have
> scores of "0.0" for both Canada (CA) and United States (US).  Is there
> a more defined way to test this plugin?
>
>   
Well, CA and US will *NEVER* fire in that case.  Rules with a score of 0
are completely disabled in SA, and they will not be evaluated at all.

Try setting them to 0.001 instead.



Re: scoring by country

Posted by Benny Pedersen <me...@junc.org>.
On Sun, December 24, 2006 06:45, Peter Matulis wrote:

> http://wiki.apache.org/spamassassin/RelayCountryPlugin
>
> and I still do not get any rules kicking in.  I am in Canada and I have
> scores of "0.0" for both Canada (CA) and United States (US).  Is there
> a more defined way to test this plugin?

have you space around =~ ?

-- 
This message was sent using 100% recycled spam mails.


Re: scoring by country

Posted by Peter Matulis <pe...@yahoo.ca>.
--- Matt Kettler <mk...@verizon.net> wrote:

> 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

Thank you for this information.  However I configured according to

http://wiki.apache.org/spamassassin/RelayCountryPlugin

and I still do not get any rules kicking in.  I am in Canada and I have
scores of "0.0" for both Canada (CA) and United States (US).  Is there
a more defined way to test this plugin?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: scoring by country

Posted by Matt Kettler <mk...@verizon.net>.
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