-
Bug
-
Resolution: Done-Errata
-
Undefined
-
rhel-9.4
-
None
-
spamassassin-3.4.6-6.el9
-
None
-
Moderate
-
rhel-sst-cs-stacks
-
ssg_core_services
-
26
-
2
-
False
-
-
None
-
None
-
Pass
-
Automated
-
All
-
None
What were you trying to do that didn't work?
Using a mariadb database as bayes database with the bayes_store_module Mail::SpamAssassin::BayesStore::MySQL.
Please provide the package NVR for which bug is seen:
spamassassin-3.4.6-5.el9.x86_64
How reproducible:
Setup spamassassin to use a mariadb database for bayes and import or learn any tokens with -D debug output enabled.
There is an error whenever it tries to add a new token:
dbg: bayes: _put_token: SQL error: Data too long for column 'token' at row 1
The table bayes_token in the database remains empty.
Steps to reproduce
- Install spamassassin and a mariadb database.
- Create the database and tables for storage using https://github.com/apache/spamassassin/blob/trunk/sql/bayes_mysql.sql
- Configure the database connection in local.cf, e.g.:
bayes_store_module Mail::SpamAssassin::BayesStore::MySQL bayes_sql_dsn DBI:MariaDB:database=spamassassin;host=mdb.example.com bayes_sql_username spamassassin bayes_sql_password password bayes_sql_override_username amavis
- Import some tokens with sa-learn or learn from spamassassin cli using the -D option to see debug output. You see the error and the table bayes_token remains empty.
Expected results
Tokens being added into the bayes_token table.
Actual results
No tokens added.
Notes
See also thread https://lists.apache.org/thread/396rsbzngm3ydc1ol5xw4mg99d5h1q64
This has been fixed in spamassassin 4.0. See also my reply in the thread from 19 June 2024 08:41:57 CEST for a possible mitigation by using the 4.0.1 MySQL.pm file.
- links to
-
RHBA-2024:136119 spamassassin update