Overview
Following an upgrade from CentOS 7 to AlmaLinux 8, Amavis may incorrectly classify emails with low spam scores as spam. This behavior is caused by a known compatibility issue with the perl-DBD-MySQL driver utilized in previous CentOS 7 environments. AlmaLinux 8 and later versions employ the perl-DBD-MariaDB driver, which resolves this classification error.
The procedure below details how to update the Warden configuration to utilize the corrected driver via the Command Line Interface (CLI).
Prerequisites
- Root or sudo privileges on the server
- Active terminal session with network connectivity for package installation
Resolution Steps
Execute the following commands sequentially to install the required driver, reset database credentials, and apply the configuration changes:
// 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
Troubleshooting
If email classification issues persist after completing these steps, verify that the Amavis and SpamAssassin services have fully restarted. Review the system mail logs for additional error messages or driver-related warnings.