Bug 2218970 - amavis using mysql has a spam threshold of 0 vs the value in the database
Summary: amavis using mysql has a spam threshold of 0 vs the value in the database
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: amavis
Version: epel9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Juan Orti
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-30 18:14 UTC by Nathan Coulson
Modified: 2023-06-30 18:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch from https://github.com/perl5-dbi/DBD-mysql/issues/78 for EL9 (949 bytes, patch)
2023-06-30 18:14 UTC, Nathan Coulson
no flags Details | Diff
Patch from https://github.com/perl5-dbi/DBD-mysql/issues/78 for EL8 (949 bytes, patch)
2023-06-30 18:22 UTC, Nathan Coulson
no flags Details | Diff

Description Nathan Coulson 2023-06-30 18:14:31 UTC
Created attachment 1973445 [details]
Patch from https://github.com/perl5-dbi/DBD-mysql/issues/78 for EL9

Description of problem:
When using a mariadb database for looking up the tagged threshold, it always returns 0 for values obtained from the database.  This is affecting AlmaLinux 8 and 9

Version-Release number of selected component (if applicable):
* EL9
** amavis 2.13.0-4.el9
** perl-DBD-MySQL 4.050-13
* EL8
** amavis 2.12.1-5.el8
** perl-DBD-MySQL 4.046-3

How reproducible:
Always

Steps to Reproduce:
1.Install Amavis
2. Configure @lookup_sql_dsn to point at a mysql database (Schema at https://github.com/srault95/amavisd-new/blob/master/README_FILES/README.sql-mysql)
3. Setup a policy with spam_tag level set to a value like 5,

Actual results:
Jun 27 13:43:25 aggelos-front4 amavis[5795]: (05795-01) spam-tag, <REDACTED> -> <REDACTED>, Yes, score=3.001 tagged_above=-100 required=0 tests=[ALL_TRUSTED=-1, BAYES_99=3.5, BAYES_999=0.5, TVD_SPACE_RATIO=0.001] autolearn=no autolearn_force=no
* required = 0, when it should be 5

Expected results:
Jun 27 15:10:43 aggelos-front4 amavis[147269]: (147269-01) spam-tag, <REDACTED> -> <REDACTED>, No, score=3.001 tagged_above=-100 required=5 tests=[ALL_TRUSTED=-1, BAYES_99=3.5, BAYES_999=0.5, TVD_SPACE_RATIO=0.001] autolearn=no autolearn_force=no


Additional info:
I believe this is due to https://github.com/perl5-dbi/DBD-mysql/issues/78, which seems to be committed to perl-DBD-MySQL master, but not in the 4.046 or 4.050 release

I patched the DBD-MySQL-4.0.50 (obtained from the ticket) provided by AlmaLinux 9 with the attached patch, and this gives me the expected results.

Comment 1 Nathan Coulson 2023-06-30 18:22:15 UTC
Created attachment 1973446 [details]
Patch from https://github.com/perl5-dbi/DBD-mysql/issues/78 for EL8

Comment 2 Nathan Coulson 2023-06-30 18:23:34 UTC
Cross posted to https://bugzilla.redhat.com/show_bug.cgi?id=2218973


Note You need to log in before you can comment on or make changes to this bug.