Overview
This article provides the required post-upgrade configuration steps for Warden after migrating a server from CentOS 7 to AlmaLinux or CloudLinux 8. Executing these commands ensures compatibility with updated system libraries, database drivers, and SpamAssassin versions.
Prerequisites
- Root access via SSH
- Completed operating system upgrade to AlmaLinux 8 or CloudLinux 8
- Warden previously installed and configured on CentOS 7
Post-Upgrade Configuration Steps
Execute the following procedures in order to restore full Warden functionality.
- Re-execute the Warden Installer
Run the installation script to resolve missing dependencies and align package configurations with the new operating system version./usr/local/psa/admin/bin/modules/warden/install.sh - Reset Amavis and SpamAssassin Database Credentials
AlmaLinux and CloudLinux 8 utilize the perl-DBD-MariaDB driver, replacing the legacy perl-DBD-MySQL driver used in CentOS 7. Failure to update the database connection string will trigger a known compatibility bug that incorrectly flags all scanned mail as spam.warden --task=contentfilter:contentfilter --default=yes --reload=yes warden --task=antispam:learning --default=yes --reload=yes - Remove Legacy Perl Module
Delete the outdated List::Util module previously installed via CPAN on CentOS 7 to prevent conflicts with system libraries.rm -rf /usr/local/share/perl5/List - Update the Spamhaus (SH) Plugin
If the SH plugin is enabled, update it to support SpamAssassin 4.0. Execute the following commands to re-enable the plugin and apply the updated rule set.// Re-enable the SH plugin. This will upgrade the SH plugin to the new version 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). This will copy the new SH rules used by the new SH plugin version warden --task=antispam:plugin:sh --sh_apikey='XXXXXXXXXXXXXXXXXXXXXXXX' --sh_hbl=1 --reload=yes
Troubleshooting & Common Issues
- All mail flagged as spam: This typically indicates that the database credentials were not reset in Step 2. Re-run the credential reset commands and verify service reloads.
- Plugin conflicts or Perl errors: Ensure the legacy module directory at /usr/local/share/perl5/List has been completely removed as specified in Step 3.
- SpamAssassin version mismatch: If using the SH plugin, confirm that SpamAssassin has been upgraded to version 4.0 and that the API key provided supports HBL queries if enabled.