Author Topic: Replacing Usermin With Roundcube in Virtualmin  (Read 179 times)

Offline dragonsway

  • Newbie
  • *
  • Posts: 4
Replacing Usermin With Roundcube in Virtualmin
« on: May 26, 2022, 02:47:05 AM »
Hi all,

I am running  Virtualmin Pro 7.0 on Ubuntu 20.04, with Roundcube 1.5.2 installed from Vmin's installer script.

I am completely new to managing Roundcube as an admin.. so I am a bit confused.  Hoping to find a little help with my basic configs.

[UPDATE]  This bug is irrelevant now... I finally found the correct installation methodology to achieve my goal of replacing Usermin with Roundcube in Virtualmin  see my reply below.

For my primary roundcube installation I have the above config which is 100% correct according to RC documentation:

Code: [Select]
//$config['default_host'] = 'localhost';   <--- works
$config['default_host'] = 'ssl://';  <---- will not connect to storage (no login) , should work exactly the same as localhost.  Am I missing something?
$config['imap_auth_type'] = PLAIN;
$config['imap_conn_options'] = [
     'ssl'         => [
     'verify_peer'  => true,
     'verify_depth' => 3,
     'cafile'       => '/home/adminuser/ssl.cert', 

When I try to log in, I get this error:

Code: [Select]
$ tail -f public_html/logs/errors.log
[26-May-2022 11:42:08 Asia/Shanghai] PHP   6. stream_socket_client() /home/adminuser/public_html/program/lib/Roundcube/rcube_imap_generic.php:1060
[26-May-2022 11:42:08 Asia/Shanghai] PHP Warning:  stream_socket_client(): unable to connect to ssl:// (Unknown error) in /home/adminuser/public_html/program/lib/Roundcube/rcube_imap_generic.php on line 1060
[26-May-2022 11:42:08 Asia/Shanghai] PHP Stack trace:
[26-May-2022 11:42:08 Asia/Shanghai] PHP   1. {main}() /home/adminuser/public_html/index.php:0
[26-May-2022 11:42:08 Asia/Shanghai] PHP   2. rcmail->login() /home/adminuser/public_html/index.php:124
[26-May-2022 11:42:08 Asia/Shanghai] PHP   3. rcube_imap->connect() /home/adminuser/public_html/program/include/rcmail.php:766
[26-May-2022 11:42:08 Asia/Shanghai] PHP   4. rcube_imap_generic->connect() /home/adminuser/public_html/program/lib/Roundcube/rcube_imap.php:172
[26-May-2022 11:42:08 Asia/Shanghai] PHP   5. rcube_imap_generic->_connect() /home/adminuser/public_html/program/lib/Roundcube/rcube_imap_generic.php:940
[26-May-2022 11:42:08 Asia/Shanghai] PHP   6. stream_socket_client() /home/adminuser/public_html/program/lib/Roundcube/rcube_imap_generic.php:1060
[26-May-2022 11:42:08 +0800]: <q2sfqdql> IMAP Error: Login failed for adminuser against from Could not connect to ssl:// Unknown reason in /home/adminuser/public_html/program/lib/Roundcube/rcube_imap.php on line 211 (POST /?_task=login&_action=login)
However, I am sure that the imap information is correct because I used it to connect to the server in Thunderbird.   

I don't why RC won't accept it.   :'(

« Last Edit: May 29, 2022, 02:34:37 AM by dragonsway »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,745
Re: Roundcube or Virtualmin IMAP Error?
« Reply #1 on: May 26, 2022, 02:07:33 PM »
Can you connect if you change "verify_peer" to false?

Offline dragonsway

  • Newbie
  • *
  • Posts: 4
Re: Roundcube or Virtualmin IMAP Error?
« Reply #2 on: May 29, 2022, 02:31:34 AM »
Hi there... @SKaero..

In the end , I used an installation method from Virtualmin's FAQ  that will post here in case other noobs find themselves in the predicament trying to replace Usermin with Roundcube... (they get bad SEO on this)...  This got everything working for me... I just have one bug to deal with and I will start a new topic for it.

In any case, @SKaero.  I highly appreciate your reply because while the internet is sprinkled with a million tutorials to install RoundCube....  Nobody, not even RoundCube, seems to think that complete examples of different types of RoundCube configurations would be useful to noobs just learning RoundCube for the first time. 

Hours of searching, got me exactly one website that dared to published what a typical  in whole would look like.  So thx again for your efforts.