Spam tagging and spam threshold

Mészáros Károly meszaros.karoly at bitmen.hu
Sun Feb 20 21:08:18 CET 2022


Hi,

You were right!!
Apparently the DBD::mysql bug has not been fixed for years :(
I replaced the DBD::mysql module with DBD::MariaDB and amavis works fine 
with the float values read from SQL.

Thanks a lot for the tip! It was perfect.

Regards,
   Károly

2022-02-19 18:31 időpontban pali at cpan.org ezt írta:
> On Saturday 19 February 2022 18:16:43 Mészáros Károly wrote:
>> Hi,
>> 
>> In the following software environment I have problems with spam 
>> tagging and
>> spam threshold values:
>> FreeBSD13.0
>> amavisd-new-2.12.2,
>> perl5 (revision 5 version 34 subversion 0),
>> 10.5.15-MariaDB (postfix 3.6.3,1; clamav 0.104.2,1; p5-DBD-mysql 
>> 4.050_1)
>> 
>> amavisd-new working with SQL as suggested by README
>> (https://www.ijs.si/software/amavisd/README.sql-mysql.txt)
>> 
>> It founds the spam policy by sql query, but the spam tag levels are 
>> always
>> 0.
>> spam_tag_level=>"0", spam_tag2_level=>"0", spam_tag3_level=>"0",
>> spam_kill_level=>"0",
>> 
>> I wrote a "check" perl script that reads the policy table values. Here 
>> the
>> float values are displayed correctly (3.000 , 6.900, etc).
>> However, the amavisd-new log shows spam_tag_level=>"0", so I suspect a
>> faulty value conversion for amavisd (and not due to p5-DBD-mysql, 
>> Mariadb or
>> perl).
>> 
>> As a workaround, I changed the float type (spam_tag_level, 
>> spam_tag2_level,
>> tag3 and kill_level) in the database to varchar and -for now- it seems 
>> fine.
>> A bit bizarre, perhaps, but it (apparently) works.
>> 
>> I've been looking for a solution for weeks now, in articles and 
>> mailing
>> lists, without success.
>> Does anyone have any suggestions? Is it a bug?
>> 
>> Best regards,
>> K
> 
> Hello Károly! In past there was a bug in DBD::mysql code which mangled
> values fetched from floating point database columns and reported they 
> to
> applications as value 0. I'm not sure if it issue was fixed, it is some
> years old.
> 
> But your description really looks like that floating point issue. One 
> of
> the solution was to change DBD::mysql perl module to DBD::MariaDB which
> did not have that floating point issue.


More information about the amavis-users mailing list