https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7164

Kevin A. McGrail <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |[email protected]
   Target Milestone|Undefined                   |3.4.2
             Status|NEW                         |RESOLVED

--- Comment #3 from Kevin A. McGrail <[email protected]> ---
More testing shows that the issue only occurs with txrep_track_messages turned
on for txrep.

And it has to be a message that generates a new msg_id from the bayes.pm
get_msgid call.  

I'm tracking the issue through the code and it appears to be from line 1269
(line #'s are likely off from my additional code for debug) which is this:  my
$msg_rep = $self->check_reputations($pms, 'MSG_ID', $msg_id, undef, $date,
undef);

which triggers $delta = $self->check_reputation(undef,@_); in
check_reputations.

Setting msgscore in line 1269 or setting it to 0 at the beginning of the block
doesn't seem correct as it appears msgscore is supposed to be undef but the
logic is missing for this case so I've added this block:

         } elsif (defined $self->total()) {
-            $delta = ($self->total() + $msgscore) / (1 + $self->count()) -
$msgscore;
+            #Bug 7164 - $msgscore undefined
+            if (defined $msgscore) {
+              $delta = ($self->total() + $msgscore) / (1 + $self->count()) -
$msgscore;
+            } else {
+              $delta = ($self->total()) / (1 + $self->count());
+            }

Will also ask Ivo to weigh in on the logic change but it's committed to 3.4 and
trunk and considered resolved.

svn commit -m 'bug 7164 - 3.4 commit - small clean up on whitespace/logic for
clarity and added logic for msgscore undefined in Txrep.pm'
Sending        lib/Mail/SpamAssassin/Plugin/TxRep.pm
Transmitting file data .
Committed revision 1678016.


svn commit -m 'bug 7164 - 3.4 commit - small clean up on whitespace/logic for
clarity and added logic for msgscore undefined in TxRep.pm'
Sending        lib/Mail/SpamAssassin/Plugin/TxRep.pm
Transmitting file data .
Committed revision 1678017.

NOTE: my comment on this commit was wrong.  Should have said trunk commit.

Regards,
KAM

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

Reply via email to