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.
  • Sounds like an OS issue. What OS did you select to install upon.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • 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.
  • The problem isn't CP or Ubuntu 20 as I have CP running on this. Google is installing their own image of Ubuntu with an incompatible version of dovecot which does not have the MySQL package.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • 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.
  • Nothing to do with mariadb.

    dovecot --version

    If its not 2.3.7.2 (3c910f64b) you have the wrong version

    Try the following

    Remove dovecot using apt then

    sed -e '/deb/ s/^#*/#/' -i /etc/apt/sources.list.d/dovecot.list

    apt clean all

    then install dovecot
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • and apt-get install -y libmysqlclient-dev
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • 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.
  • I think rainloop short login is a bit buggy
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • 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!
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!