When looking at the server mail log you see this:
Apr 4 11:01:15 alma amavis[3540852]: (3540852-05) (!)connect_to_sql: unable to connect to DSN 'DBI:MariaDB:database=danami_warden;host=127.0.0.1': Host '127.0.0.1' is not allowed to connect to this MariaDB server
Apr 4 11:01:15 alma amavis[3540852]: (3540852-05) (!!)TROUBLE in check_mail: gen_mail_id FAILED: connect_to_sql: unable to connect to any dataset at /usr/share/perl5/vendor_perl/Amavis/Out/SQL/Connection.pm line 255.
Apr 4 11:01:15 alma postfix/cleanup[3534095]: 8AD7A1004203BC: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.5.0 Error in processing, id=3540852-05, gen_mail_id FAILED: connect_to_sql: unable to connect to any dataset at /usr/share/perl5/vendor_perl/Amavis/Out/SQL/Connection.pm line 255.; from=<root@alma.example.com> to=<root@alma.example.com>
Apr 4 11:01:15 alma psa-pc-remote[424364]: Message aborted.
1. Skip-name-resolve Enabled
This can be caused because skip-name-resolve is enabled in the MariaDB config. To fix this edit the file /etc/my.cnf and any files in /etc/my.cnf.d/ and comment out or remove the line skip-name-resolve = 1 . Then restart mariadb.
systemctl restart mariadb
2. Corrupted DB Credential Issues
This can also be caused by a missing or corrupted DB credentials in the Warden config. Admins can reset the credentials using the instructions below:
// reset the Amavis database credentials
warden --task=contentfilter:contentfilter --default=yes --reload=yes
// reset the SpamAssassin learning database credentials
warden --task=antispam:learning --default=yes --reload