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

            Bug ID: 7235
           Summary: Plugin::TxRep: txrep.count field reaching 32-bit
                    maxint
           Product: Spamassassin
           Version: 3.4.1
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Plugins
          Assignee: [email protected]
          Reporter: [email protected]

Found the following in our logs after using the TxRep plugin
for a couple of months:

SA info: auto-whitelist: sql-based add_score/update
4294967295|-1.709|vscan|[email protected]|amazonses.com|dropbox.com|none:
SQL error: Out of range value for column 'count' at row 1
SA info: auto-whitelist: sql-based add_score/update
4294967295|-1.709|vscan|amazonses.com
dropbox.com|amazonses.com|dropbox.com|none: SQL error: Out of range value for
column 'count' at row 1
SA info: auto-whitelist: sql-based add_score/update
4294967295|2.265|vscan|[email protected]|email.fitbit.com|fitbit.com|none:
SQL error: Out of range value for column 'count' at row 1
SA info: auto-whitelist: sql-based add_score/update
4294967295|2.265|vscan|email.fitbit.com
fitbit.com|email.fitbit.com|fitbit.com|none: SQL error: Out of range value for
column 'count' at row 1
SA info: auto-whitelist: sql-based add_score/update
4294967295|2.786|vscan|[email protected]|email.fitbit.com|fitbit.com|none:
SQL error: Out of range value for column 'count' at row 1
SA info: auto-whitelist: sql-based add_score/update
4294967295|2.786|vscan|email.fitbit.com
fitbit.com|email.fitbit.com|fitbit.com|none: SQL error: Out of range value for
column 'count' at row 1

Seems the txrep.count in MySQL table is limited to a 32-bit integer.

Can't imagine what chain of events lead to this large value in a
couple of months, we are not receiving hundreds of messages per second.

The info() is reported by SQLBasedAddrList.pm,
called from TxRep.pm line 1569:

sub add_score
[...]
  } else {
    $self->{checker}->add_score($self->{entry}, $score);
  }



mysql> select count(*) from txrep where count=2147483647;
+----------+
| count(*) |
+----------+
|      330 |
+----------+


mysql> select count(*) from txrep where count>2147483647;
+----------+
| count(*) |
+----------+
|        0 |
+----------+


mysql> select count(*) from txrep;
+----------+
| count(*) |
+----------+
|  1374582 |
+----------+

mysql> select email,ip,count,totscore,signedby from txrep order by count desc
limit 10;
+---------------------------------------+------+------------+----------+--------------------+
| email                                 | ip   | count      | totscore |
signedby           |
+---------------------------------------+------+------------+----------+--------------------+
| 500px.com mandrillapp.com             | none | 2147483647 |     88.6 |
500px.com          |
| [email protected]            | none | 2147483647 |    23.79 |
amazonses.com      |
| 30.memberemail.com novusbio-email.com | none | 2147483647 |  -10.291 |
30.memberemail.com |
| amazonses.com 1nadan.si               | none | 2147483647 |  331.591 |
amazonses.com      |
| amazonses.com 1nadan.si               | none | 2147483647 |  331.591 |
1nadan.si          |
| 30.memberemail.com novusbio-email.com | none | 2147483647 |  -10.291 |
novusbio-email.com |
| 500px.com mandrillapp.com             | none | 2147483647 |     88.6 |
mandrillapp.com    |
| [email protected]            | none | 2147483647 |    23.79 |
amazon.co.uk       |
| amavis.org gmail.com                  | none | 2147483647 |  -171.07 |
gmail.com          |
| amavis.org gmail.com                  | none | 2147483647 |  -171.07 |
amavis.org         |
+---------------------------------------+------+------------+----------+--------------------+


After some 350 records the sorted txrep.count slowly starts to fall
to lower (but still large) values.

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

Reply via email to