Workaround for (some) Problems: Can´t login in Rainloop

After testing a lot (nearly 30 installations of CP on VM´s with Ubuntu 18 and 20 and Centos 7 and 8) I figured out a workaround for the Problem:

Cant login to rainloop.

Because the behaviour ONLY is on Ubuntu Installations I go a lit deeper and figured out:

Cyberpanel in last version (2.1.1) uses bcrypt to encrypt mail passwords to it´s own authentication tabel in database. All passwords starting with {crypt} in the database.

Unfortunally nor Ubuntu 18 or Ubuntu 20 supports bcrypt as authentication for the used dovecot implementation (2.2.x).

So it comes, that password is correct encrypted wit bcrypt to the database by CP GUI, but Rainloop can´t verify the given password, because rainloop is not able to encrypt the entered password with bcrypt.

So any given password will never work!

My workaround is simple: Manual updating to dovecot 2.3.x, because since this version dovecot has build in bcrypt libraries.

You can do it with the following steps:

  1. Add the reposity key of dovecot to the rpm key store:

sudo apt-key adv --keyserver hkp:// --recv 18A348AEED409DA1

  1. Add the official dovecot Ubuntu Repo to sources.list

(this example is for Ubuntu 18)

sudo nano /etc/apt/sources.list.d/dovecot.list

insert into:

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

Save it and close editor

  1. Do a:

sudo apt update

  1. Do a:

sudo apt dist-upgrade

  1. Reboot your machine.

After this Your rainloop login should run like a charme.

At the end I would like to say: I´m shocked, that CP team do big changes to the system (encrypt passwords) without testing it on the supported platforms! If Ubuntu IS SUPPORTED, you should testrun such deeply changes against (new) installations. There are a lot of problems and a lot of reports in forum, but so few solutions for it :frowning:

I Like CP a lot - I hope you can insert dovecot 2.3. to your installation scripts for CP, so nobody will run again into the trouble. It costs me one week to figure it out…

Best regards,

Thank you for the research, in fact we earlier used

insert into:

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

But now focal have its own dovecot package. Was you installing directly or using provider image?

I installed on clean / fresh Ubuntu 18 (and 20, and Centos 7 and Cent OS8) virtual root machine at german “DomainFactory” jiffy Box (cloud) with your install script:

I was wondering why te CP GUI can encrypt password correct {CRYPT} and why dovecot can´t crypt the given password to do the check. but dovecot self writes about it on their Website:

In the first grey box you can read:


v2.2: bcrypt is not available on most Linux distributions). Since v2.3.0 this is provided by dovecot.

It´s not a problem with CentOS installations of CB, but with Ubuntu, because the install script installs Dovecot 2.2.x and not 2.3.x.

After Update with the mentioned way, all works fine :slight_smile:

I’ve installed fresh on Ubuntu 20.04 and as expected I already got Dovecot 2.3.x

My provide is DigitalOcean, see the output

root@mailtestubuntu:~# apt list --installed | grep postfix

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

postfix-mysql/focal-updates,now 3.4.13-0ubuntu1 amd64 [installed]
postfix/focal-updates,now 3.4.13-0ubuntu1 amd64 [installed]
root@mailtestubuntu:~# apt list --installed | grep dovecot

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

dovecot-core/focal-updates,focal-security,now 1: amd64 [installed,automatic]
dovecot-imapd/focal-updates,focal-security,now 1: amd64 [installed]
dovecot-mysql/focal-updates,focal-security,now 1: amd64 [installed]
dovecot-pop3d/focal-updates,focal-security,now 1: amd64 [installed]

Maybe it´s an issue with my provider. They try to force to use their own mirrors for repos. Maybe it´s not actual

I have been having this issue as well for the past few days. Bought a test VPS and was looking at the error logs when I found “Invalid password in passdb: crypt() failed: Invalid argument” in the mail logs. So I searched the web and after some research came to the conclusion that dovecot needs upgrade. Kais provided a nice way to update the packages. Many thanks to Kais.

I also would like to confirm that I tested fresh installs on ubuntu 18.04 and 20.04 as well and had the same errors both times. Seems like I had a 2.2.x installed. I think its an issue with some if not most providers Of course leaving out the well known ones such as Linode, Google, and Digital Ocean as said by usmannasir.

And I also had some issues with SSL setup as well, which was sorted by manually entering the SSL.

After updating, my login issue is gone and now just need to update the spam score.
I signed up just to leave this comment.
Once again thanks a lot to Kais.

Another reminder: the Admin PW to rainloop is set in the config file. It must be encrypted. Only the initial version of the passwort “12345” is allowed to be placed unencrypted. But beware: If you wanna login as admin you always have to alter your url wit ?admin at the end. Admin Login will not work on the “normal” login mask.

sudo apt-key adv --keyserver hkp:// --recv 18A348AEED409DA1

apt-key is not recognized fror CP on cent os 7. Can you help me alternate codes like yum?


Thank you !! It has worked for me.

Please how did you go about it?
I’m still having issues with mine

Hi Macho,

the described way is for an installation based on Ubuntu 18.04 “Bionic”.

Ich you run on another distribution you have to use another repo to include, depending on your distribution


Yes Please, my installation is for Ubuntu 18.04 “Bionic”. I followed all the steps you listed but when I go to this point
insert into:

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

I’m lost. Do i copy everything on that line and insert? Please help me, I’m lost.

This is the error i’m facing.

Save the file as mentioned in the main post and follow the next steps then.

@usmannasir , thanks. It worked now. Thank you very much. Please I can send out mails, but I can’t receive. What can I do to fix that?

Please start a new Topic for different question

1 Like

Thanks, I was able to sort it out. Thank you very much.

i did all this and still have the problem (still can’t login to snappymail) what can i do ?

For all who have a problem with these instructions:

Due to the move of the Cyberpanel forum to a different software, errors were introduced when copying the posts. An additional character has crept into the original instructions. Unfortunately I cannot edit the text in the article above. The line to insert the repository in the dovecot.list file must be correct:

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


You have to delete “Index of” and the number “6” between “bionic/ 6 bionic” so the correct version:

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