Joseph Malone wrote:
> I'm trying to write a rule that will add points if the e-mail is sent
> from outside the U.S. or Canada.  Using countries.nerd.dk,  the rule
> is supposed to add points to everything, than subtract the points if
> the e-mail came from the U.S. or Canada.  However, I'm not sure that
> it's working.  Can anyone see anything wrong with the syntax/logic?
> 
> 
> -------------------
> #block ips out of us and ca
> header __RCVD_IN_NERDS    eval:check_rbl('nerds', 'zz.countries.nerd.dk.') 
> describe __RCVD_IN_NERDS    Rule to match
> every country 
> tflags __RCVD_IN_NERDS    net
> score RCVD_IN_NERDS_US    0.1
> 
> header RCVD_IN_NERDS_US    eval:check_rbl_sub('nerds', '127.0.3.72')
> describe RCVD_IN_NERDS_US    Rule to deduct weight for US sourced
> messages tflags RCVD_IN_NERDS_US    net nice
> score RCVD_IN_NERDS_US    -0.1
> 
> header RCVD_IN_NERDS_CA    eval:check_rbl_sub('nerds', '127.0.0.124')
> describe RCVD_IN_NERDS_CA    Rule to deduct weight for CA sourced
> messages tflags RCVD_IN_NERDS_CA    net nice
> score RCVD_IN_NERDS_CA    -0.1
> --------------------

Yep... You have two conflicting "score RCVD_IN_NERDS_US" lines.  If you were 
trying to assign a positive score for the first (everything) test you should 
not have used a non-scored __RULE name.

If you're running 3.1.0, check out the Mail::SpamAssassin::Plugin::RelayCountry 
plugin, which can give similar results in a single test with much lower 
overhead.

Pierre Thomson
BIC

Reply via email to