After upgrading from Centos 7 to AlmaLinux/CoundLinux 8 you should run the commands below to get Warden fully functional again:
1. First re-run the Warden installer from the command line. It will install any missing packages for the new OS.
/usr/local/psa/admin/bin/modules/warden/install.sh
2. Reset the Amavis and SpamAssassin database credentials. This will change the DB connection string used to the new perl-DBD-MariaDB driver used on AlmaLinux/CoundLinux 8+:
warden --task=contentfilter:contentfilter --default=yes --reload=yes
warden --task=antispam:learning --default=yes --reload=yes
3. Delete the legacy Perl module List::Util that was installed using Cpan on Centos 7:
rm -rf /usr/local/share/perl5/List
4. If you are using the SH plugin then you need to use the commands below to update the SH plugin from SpamAssassin 3.4 to SpamAssassin 4.0 .
// Enable the SH plugin
warden --task=antispam:plugins --SH=1 --reload=yes
// Set the SH API key and enable the HBL (replace XXXX with your real API key. Only enable the HBL if your key supports it)
warden --task=antispam:plugin:sh --sh_apikey='XXXXXXXXXXXXXXXXXXXXXXXX' --sh_hbl=1 --reload=yes