When installing iRedMail on Ubuntu. If you choose OpenLDAP as Backend and already have mariadb-server installed, the installation will fail due to that it's trying to install mysql-server. There should be a check in functions/packages.sh where it identifies if mysql-server or mariadb-server is already installed. If none is installed, you should be able to choose if you want to use MySQL or MariaDB as "secondary" backend.
This may also be true for other distributions and choice of backend.
Best Regards Johan Olsson