Author Topic: Migrating Roundcube to a new server and imaps logins fail  (Read 2461 times)

Offline hedeyo

  • Newbie
  • *
  • Posts: 1
Migrating Roundcube to a new server and imaps logins fail
« on: November 28, 2017, 09:52:29 AM »
I am migrating my installation from   Ubuntu 14.04  with PHP5.5.9   to Ubuntu 16.06 with PHP7.0.22.   Roundcube 1.3.3 on both servers

I copied across the /path/to/roundcube and the database and import to the new server.

I can browse to the login screen on the new server but when I try and log in it fails with the following error in the web browser

Code: [Select]
Connection to storage server failed.
And the error seen in /path/to/roundcube/logs/errors is

Code: [Select]
[28-Nov-2017 11:47:29 +0000]: <xxxxxxx> IMAP Error: Login failed for username from 10.1.1.10. Could not connect to ssl://10.1.1.9:993: Unknown reason in /var/www/webmai
l/rc/program/lib/Roundcube/rcube_imap.php on line 196 (POST /rc/?_task=login&_action=login)

This login process works fine on the old server.   

The imap server (dovecot) and both old and new roundcube are on physically different machines

On the new server if I disable ssl connection and just login with IMAP instead of IMAPS it works so I am thinking it is SSL related.      Turning on IMAP debuging when logging in over IMAPS shows nothing.

If I run tcpdump on my imap server, I can see imaps connection attempts from the new roundcube server and can telnet to the imap server on 993 and it answers

Does anyone have any suggestions on how best to figure out what I've missed that is preventing login
« Last Edit: November 28, 2017, 10:08:30 AM by hedeyo »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Migrating Roundcube to a new server and imaps logins fail
« Reply #1 on: November 28, 2017, 11:52:35 AM »
You may need to play with the ssl options in the Roundcube config:
Code: [Select]
// IMAP socket context options
// See http://php.net/manual/en/context.ssl.php
// The example below enables server certificate validation
//$config['imap_conn_options'] = array(
//  'ssl'         => array(
//     'verify_peer'  => true,
//     'verify_depth' => 3,
//     'cafile'       => '/etc/openssl/certs/ca.crt',
//   ),
// );
// Note: These can be also specified as an array of options indexed by hostname
$config['imap_conn_options'] = null;