Dovecot fatal error with mysql driver on GCP

Hi,
I’ve been troubleshooting my email setup for almost a week. I’ve successfully set up sending email via relay (Google blocks port 25) using Mailjet. But since day one I haven’t been able to login into rainloop or receive any emails. I’ve tried every configuration I could find, until I realised the reason nothing works is that dovecot can’t access the mysql database because of a driver issue:

auth: Fatal: sql: Unknown database driver ‘mysql’

I’ve run dovecot --build-options and mysql, postgre and sqlite are all listed as drivers.

I’ve tried apt-get install dovecot-mysql but that refuses to budge because of dependencies. This GCP deployment seems to use Mariadb.

I should add that I’ve spun up a fresh instance of Cyberpanel and it’s broken like this for me out of the box, giving the same error about the mysql driver.

I don’t get a choice of the OS on click to deploy Google Cloud. But the setup is listed as:

Operating system
Ubuntu 20.04

Package contents
Cyberpanel 2.0.2
OpenLiteSpeed 1.6.14
RainLoop 1.14.0
MariaDB 10.3
phpMyAdmin 5.0.2
PowerDNS 4.2.1
Postfix 3.3.0

And as soon as I login for the first time Cyberpanel runs it updater if it’s out of date.

I have tried to reinstall dovecot with an apt-get install dovecot-mysql and it refuses because of a dependency issue with a libmysql–etc. which doesn’t exist, presumably, because mariadb is what’s really installed.

The version I was showing was: 2.3.10.1 (a3d0e1171).

I removed everything like you said and reinstalled. I had to be a bit more specific about the pkg removal though, I had to specify dovecot-core, dovecot-mysql, dovecot-pop3d and dovecot-imapd and lo and behold we’ve moved past the ‘mysql’ driver error.

Now I just can’t get in because of an auth issue :joy:

I had the same issue on Ubuntu-20 after performing apt-get dist-upgrade.

  1. Modified /etc/apt/sources.list.d/dovecot.list as

deb [arch=amd64] Index of /ce-2.3-latest/ubuntu/bionic/ bionic main

  1. Manually installed the DEB package http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/libmysqlclient20_5.7.21-1ubuntu1_amd64.deb

  2. Installed dovecot-mysql via APT.

Type your comment> @seff said:

I had the same issue on Ubuntu-20 after performing apt-get dist-upgrade.

  1. Modified /etc/apt/sources.list.d/dovecot.list as

deb [arch=amd64] Index of /ce-2.3-latest/ubuntu/bionic/ bionic main

  1. Manually installed the DEB package http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/libmysqlclient20_5.7.21-1ubuntu1_amd64.deb

  2. Installed dovecot-mysql via APT.

Thank You seff. you solution works for me. Of course, the authentication problems still here, no more under sql driver situation.

@seff Thank you!! This also fixed my issue of login into RainLoop