Mailing List Archive

[Bug 3229] Roundoff in score summary leads to many newbie complaints
http://bugzilla.spamassassin.org/show_bug.cgi?id=3229





------- Additional Comments From j.houwing@student.utwente.nl 2004-03-30 02:01 -------
It would probably best to floor the score at one level obove the precision of
the required score. eg:

REQ SCR FLSCR
5 4.99 4.9
5.0 4.999 4.99
5.00 4.9999 4.999
5 5.001 5.0
5.0 5.001 5.00
5.00 5.001 5.001

This should be enough to show the difference, but would not butcher the scores.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3229] Roundoff in score summary leads to many newbie complaints [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3229





------- Additional Comments From apthorpe@cynistar.net 2004-03-30 06:23 -------
The problem with:

X-Spam-Status: No, hits=5.0 required=5.0 tests=[...]

is not in the digits but in the statement of equality. So rather than looking
for a clever hack to mangle the numerics, change the 'hits=' to 'hits<' to
express the proper relationship between hits and score.

The relevant code is in 10_misc.cf and PerMsgStatus.pm:

10_misc.cf:
add_header all Status "_YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_
autolearn=_AUTOLEARN_ version=_VERSION_"

PerMsgStatus.pm:
%tags = (
...
SCORE => sub { $self->_get_tag_value_for_score() },
HITS => sub { $self->_get_tag_value_for_score() },

REQD => sub { $self->_get_tag_value_for_required_score() },
...

I suggest we add to PerMsgStatus.pm:

my $epsilon = 0.01; # least significant digit, based on precision

and later in the %tags assignment:

SEQ => sub {
my $delta = $self->{conf}->{required_score} - $self->{score};
(($delta > 0) && ($delta < $epsilon)) ? '<' : '='
},

(also, reevaluate the hackery in _get_tag_value_for_score())

and finally modify 10_misc.cf:

add_header all Status "_YESNO_, score_SEQ__SCORE_ required=_REQD_ tests=_TESTS_
autolearn=_AUTOLEARN_ version=_VERSION_"

The downside of this change is that any script that analyzes messages, looking
ffor 'hits=' will need to be modified.

I will supply patches if anyone is interested in this.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3229] Roundoff in score summary leads to many newbie complaints [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3229

felicity@kluge.net changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE



------- Additional Comments From felicity@kluge.net 2004-03-30 08:48 -------
Yeah, it comes up a lot. People need to read the FAQ/wiki.

But this issue was already fixed in 3.0, so ...

*** This bug has been marked as a duplicate of 2607 ***



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.