Bug 5519 - [review] Zeroing a score does not disable plugin eval rules
Summary: [review] Zeroing a score does not disable plugin eval rules
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.2.1
Hardware: All All
: P5 minor
Target Milestone: 3.2.3
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard: go
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-15 06:08 UTC by Mark Martinec
Modified: 2007-08-07 10:49 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Patch to make zero score disable plugin eval rules patch None Richard Birkett [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Martinec 2007-06-15 06:08:52 UTC
I'm copying comment #16 from Bug 5485 as a separate problem report
so that it does not get forgotten. It is an independent problem anyway.

here it goes (#16):

> zero score DK/DKIM_POLICY_SIGNSOME rules

Hmmm, is zeroing a score for a rule supposed to disable any such rule?
Somehow I get the impression this works for plain, RBL, URI, etc rules,
but not for plugin eval rules. I still see hits on DKIM_POLICY_SIGNSOME,
BOTNET_IPINHOSTNAME, BOTNET_CLIENT and similar, explicitly reporting 0
points, even though I have their score set to 0.

In Check::run_eval_tests() I don't see any checks on score, like
there are in other do_*_tests routines. I think this used to work
in 3.1.8 as expected.
Comment 1 Richard Birkett 2007-07-21 06:57:42 UTC
Created attachment 4056 [details]
Patch to make zero score disable plugin eval rules

This patch applies both to trunk and to branches/3.2 (with an offset), and
restores the functionality of a zero score disabling a plugin eval rule.

(Note indenting is a bit odd to keep the patch small!)
Comment 2 Justin Mason 2007-07-29 12:51:24 UTC
should get this in for 3.2.3
Comment 3 Justin Mason 2007-07-30 06:04:07 UTC
looks good to me; applied to trunk:

: jm 122...; svn commit -m "bug 5519: zeroing an 'eval' rule's score did not
stop it running.  fix, thanks to Richard Birkett <richard+spamassassin at
musicbox.net>" lib/Mail/SpamAssassin/Plugin/Check.pm
Sending        lib/Mail/SpamAssassin/Plugin/Check.pm
Transmitting file data .
Committed revision 560962.
Comment 4 Mark Martinec 2007-07-31 11:54:48 UTC
> should get this in for 3.2.3
> looks good to me; applied to trunk:

+1  looks good, works fine
Comment 5 Daryl C. W. O'Shea 2007-08-07 10:23:15 UTC
+1
Comment 6 Justin Mason 2007-08-07 10:49:15 UTC
in 3.2.x:

: jm 450...; svn commit -m "zeroing an 'eval' rule's score did not stop it
running.  fix, thanks to Richard Birkett <richard+spamassassin at musicbox.net>"
lib/Mail/SpamAssassin/Plugin/Check.pm
Sending        lib/Mail/SpamAssassin/Plugin/Check.pm
Transmitting file data .
Committed revision 563590.