Roundcube refusing connection after new SSL certificate

hi everyone!

I updated my ssl certificate (gandi), following the certificate tutorial.

Also, I did not update the server in a while in order to avoid creating more sources of failure ^^ (but may be the root cause)

:~# yunohost -v
moulinette: 2.2.1.1
moulinette-yunohost: 2.2.4
yunohost-admin: 2.2.1

All the apps I was using are working (owncloud, kanboard, baikal, jappix, custom_webapp) except for roundcube which now states : “Can’t connect to data storage”.

/var/www/roundcube/logs/errors:

[08-Jul-2016 11:49:22 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Empty startup greeting (localhost:143) in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/)
[08-Jul-2016 11:49:24 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Could not connect to localhost:143: Connexion refusée in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/)
[08-Jul-2016 11:49:25 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Could not connect to localhost:143: Connexion refusée in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/)
[08-Jul-2016 11:57:50 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Could not connect to localhost:143: Connexion refusée in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/?sso_login=025242493497258)
[08-Jul-2016 11:57:52 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Could not connect to localhost:143: Connexion refusée in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/?sso_login=025242493497258)
[08-Jul-2016 11:57:57 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Could not connect to localhost:143: Connexion refusée in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/?sso_login=025242493497258)
[08-Jul-2016 11:57:58 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Could not connect to localhost:143: Connexion refusée in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/?sso_login=025242493497258)
[08-Jul-2016 11:58:43 +0200]: IMAP Error: Login failed for vey from XX.XXX.XXX.XX. Could not connect to localhost:143: Connexion refusée in /var/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (GET /webmail/)

So I searched for the error on the forum and internet only to find that this may be related to the imap server. So I restarted dovecot, postfix and amavis and tried to connect again but with same result.

Did anyone else has experienced this before ?

I don’t know if this the proper way to do it, but I managed to get roundcube to work again!

I don’t know why but turns out, dovecot was not running with no error message stated.

I had to check dovecot status to get this error:

doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 33: ssl_cert: Can’t open file /etc/ssl/certs/yunohost_crt.pem: No such file or directory

So I opened /etc/dovecot/dovecot.conf, commented this section:

ssl_ca = < /etc/ssl/certs/ca-yunohost_crt.pem
ssl_cert = < /etc/ssl/certs/yunohost_crt.pem
ssl_key = < /etc/ssl/private/yunohost_key.pem

and added, just above the commented section, my paths to my new ssl keys:

ssl_cert = < /etc/yunohost/certs/MY-DOMAIN.TLD/crt.pem
ssl_key = < /etc/yunohost/certs/MY-DOMAIN.TLD/key.pem

Hope this is usefull for somebody