After upgrading from Centos7 to AlmaLinux 8 Amavis is treating mail with low scores as spam. This is due to a bug with the perl-DBD-MySQL driver that Amavis used previously on Centos7. On AlmaLinux 8+ Amavis uses the perl-DBD-MariaDB which fixes this bug.
To switch the Warden config to use the perl-DBD-MariaDB driver using the Command Line Interface
This will reset the Amavis database credentials and switch to the new perl-DBD-MariaDB driver:
// make sure that the perl-DBD-MariaDB package is installed
yum install perl-DBD-MariaDB
// reset the Amavis database credentials
warden --task=contentfilter:contentfilter --default=yes --reload=yes
// reset the SpamAssassin database credentials
warden --task=antispam:learning --default=yes --reload=yes