Fix RainLoop Login Error on CyberPanel

There may be many reasons why you can't login to your email accounts on RainLoop. In my case, I was getting the Authentication Failed error whenever I tried to login to my email account. I was getting this error even though I was trying to login with the correct email and password.

As it turned out it was a Dovecot error. You can follow the below steps to find out if you have the same issue and how it can be fixed.

Open your terminal and use the following command to start capturing Dovecot log:

journalctl -f | grep dovecot

Then try to login to your email account on RainLoop. This will cause the previous command to display Dovecot log on your terminal. Now, go back to your terminal too see the captured log printed on your terminal. In my case the error was something like this:

Aug 23 21:37:41 dovecot[2650]: auth: Fatal: sql: Unknown database driver 'mysql'
Aug 23 21:37:41 dovecot[2647]: master: Error: service(auth): command startup failed, throttling for 2.000 secs
Aug 23 21:37:41 dovecot[2650]: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=, lip=, secured, session=<Q6it00EKxH1/DACB>

Just from the first line you can see it is giving an Unknown database driver 'mysql' error. Now to stop capturing Dovecot log, like everything else, you can press Ctrl + C.

Then to fix this error, you can use the following commands:

apt remove dovecot-core dovecot-mysql dovecot-pop3d dovecot-imapd
sed -e '/deb/ s/^#*/#/' -i /etc/apt/sources.list.d/dovecot.list

Note: this previous line beginning with the sed command, may not be necessary and throw an error. In that case, don't worry about it, just continue to the next line.

apt clean all
apt install dovecot-core dovecot-mysql dovecot-pop3d dovecot-imapd
apt-get install -y libmysqlclient-dev

Then use the following command to check Dovecot status

systemctl status dovecot -l

This should give you the Dovecot status log. In my case it was something like this:

● dovecot.service - Dovecot IMAP/POP3 email server
     Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor prese>
     Active: active (running) since Mon 2021-08-23 21:56:36 UTC; 1h 42min ago
       Docs: man:dovecot(1)
   Main PID: 52936 (dovecot)

Now, try to login to your email account on RainLoop. It should work just fine.

2 comments on “Fix RainLoop Login Error on CyberPanel”

  1. Hi,

    I have installed Cyberpanel to my server and using rainloop in it. It is fresh install.

    When I executed "journalctl -f | grep dovecot" I got following results.

    auth-worker(2701): Error: sql([email protected],,): Invalid password in passdb: crypt() failed: Invalid argument
    imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=, method=PLAIN, rip=, lip=, TLS, session=

    How can I fix it?

Leave a Reply

Your email address will not be published.