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.
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