You see errors like this in the mail log:
Jan 1 03:30:45 busy-gates amavis[18902]: (18902-01) (!)connect_to_sql: unable to connect to DSN 'DBI:MariaDB:database=danami_warden;host=localhost': Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (13) Jan 1 03:30:45 busy-gates amavis[18902]: (18902-01) (!!)TROUBLE in check_mail: gen_mail_id FAILED: connect_to_sql: unable to connect to any dataset at (eval 100) line 253.
SELinux Issues
SELinux issues with rpm based systems using MariaDB 10.5+ with SELinux enabled. This can be caused by a a bug in MariaDB where it is not setting the correct SELinux context on the MariDB socket so nothing can connect to it (MDEV-24941 bug report). To fix the issue:
Run the following command:
chcon system_u:object_r:mysqld_exec_t:s0 /usr/sbin/mariadbd && systemctl restart mariadb.service
This should fix the issue until MariaDB fixes their RPM packages.
Corrupted DB Credentials
This can also be caused by a missing or corrupted DB credentials in the Warden config. Admins can go though the Warden setup wizard again and Warden will try to repair the issue. See here for more information.