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

--- Comment #2 from Matija Nalis <mnalis-sa...@voyager.hr> ---

the SQL statement seems to be in the  Mail/SpamAssassin/SQLBasedAddrList.pm
which seems to set msgcount to value specified by script:

    my $sql = "UPDATE $self->{tablename} ".
              "SET msgcount = ?, totscore = totscore + ? ".
              "WHERE username = ? AND email = ?";

I haven't tried 4.0/trunk for that, but looking in SVN
https://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm?revision=1903510&view=markup#l361
it seems to use similar logic.

Is there a reason why the SA code specifies the final msgcount score manually?
Sure, original bug leading to that should be found and fixed, but wouldn't
letting SQL update the counter avoid such horrific pitfalls, as we presumably
always work on message-by-message basis?

E.g. something like:

    my $sql = "UPDATE $self->{tablename} ".
              "SET msgcount = msgcount + 1, totscore = totscore + ? ".
              "WHERE username = ? AND email = ?";

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

Reply via email to