Dovecot fatal error with mysql driver on GCP — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

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.

Comments

  • 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 😂
  • And I've sorted out the auth issue with Rainloop. Running doveadm auth test [email protected] password showed me that dovecot was working.

    The logs were showing that the domain was being dropped in the username by rainloop. I turned off short-login over there and it works perfectly now.

    Thanks for the help, hennaboy. Much appreciated.
  • For anyone else who runs into the issue I had in the OP: This dovecot version problem doesn't seem to be contained to Google Cloud. I spun up a Digitalocean droplet for someone yesterday and had exactly the same problem as I did on GCP. I followed hennaboy's fix, though, and everything is working fine. Well, once I worked out how to set the PTR on Digitalocean, which is now also done!
  • edited November 2020
    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] https://repo.dovecot.org/ce-2.3-latest/ubuntu/bionic bionic main
    ---

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

    3. Installed dovecot-mysql via APT.
  • charliesjc, I'm running into the exact problem you are ... I think. But this mysterious "hennaboy" seems to have disappeared. Any chance you remember the steps you took?
  • 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] https://repo.dovecot.org/ce-2.3-latest/ubuntu/bionic bionic main
    > ---
    >
    > 2. Manually installed the DEB package http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/libmysqlclient20_5.7.21-1ubuntu1_amd64.deb
    >
    > 3. 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.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!