Author Topic: switching from squirrelmail, but roundcube not communicating  (Read 4076 times)

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
switching from squirrelmail, but roundcube not communicating
« on: December 22, 2018, 07:05:22 PM »
My installation of squirrelmail  on Kubuntu 18.04 stopped downloading mail from comcast. I switched to roundcube, but I'm having several installation issues trying to communicate with the imap server for comcast.net and also roundcube accessing mariadb.

The installer "3. Test config" shows:

Check config file
defaults.inc.php:  OK
config.inc.php:  OK
Check if directories are writable

Roundcube may need to write/save files into these directories
/usr/share/roundcube/temp/:  OK
/usr/share/roundcube/logs/:  OK
Check DB config
DSN (write):  OK
DB Schema:  OK
DB Write:  OK
DB Time:  OK
Test filetype detection
Fileinfo/mime_content_type configuration:  OK
Mimetype to file extension mapping:  OK

Yet when I go to //localhost/roundcube I get:

DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

However, at the command line, I can:

$ mysql -u root -p
Enter password: #######
Welcome to the MariaDB monitor.  Commands end with ; or \g.

And yes, I did set up DATABASE roundcubedb
Checking /var/log/roundcube/errors , I see:

[22-Dec-2018 17:50:20 -0600]: <otanvb51> DB Error: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) in /usr/share/roundcube/program/lib/Roundcube/rcube_db.php on line 176 (GET /roundcube/)
[22-Dec-2018 17:50:20 -0600]: <otanvb51> DB Error: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) (GET /roundcube/)


I also have a problem testing the login to comcast. I have debugged evolution on another Kubuntu 18.04 machine and learned that I should use imap.ge.xfinity.com , so:

$config['default_host'] = 'ssl://imap.ge.xfinity.com';

// TCP port used for IMAP connections
$config['default_port'] = 993;

Yet, when I test the imap connection, I get:

Connecting to ssl://imap.ge.xfinity.com...
IMAP connect:  NOT OK(Login failed for johnzbesko from 127.0.0.1. Could not connect to ssl://imap.ge.xfinity.com:993: Unknown reason)

So, I am stuck and subscribing to this board as a last ditch effort to install roundcube. BTW, I also tried imap.gmail.com, but that failed, too.

Thanks for any help.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,506
    • http://SKaero.com/
Re: switching from squirrelmail, but roundcube not communicating
« Reply #1 on: December 22, 2018, 08:49:50 PM »
1. Database problem
Can you connect to the database out side of Roundcube by running the following? (Assuming the SQL user you setup is roundcube and the database you created is roundcubedb)
Code: [Select]
mysql -u roundcube -p roundcubedb

2. IMAP problem
It maybe a SSL problem try adding the following to the config.inc.php:
Code: [Select]
$config['imap_conn_options'] = array(
  'ssl' => array(
    'verify_peer'  => false,
  ),
);

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #2 on: December 22, 2018, 11:22:47 PM »
$ mysql -u roundcube -p roundcubedb
Enter password: ########
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 33593
Server version: 10.1.34-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [roundcubedb]>


And then:

$config['default_host'] = 'ssl://imap.ge.xfinity.com';

// TCP port used for IMAP connections
$config['default_port'] = 993;

$config['imap_conn_options'] = array(
  'ssl' => array(
    'verify_peer'  => false,
  ),
);


and again:

Connecting to ssl://imap.ge.xfinity.com...
IMAP connect:  NOT OK(Login failed for johnzbesko from 127.0.0.1. Could not connect to ssl://imap.ge.xfinity.com:993: Unknown reason)


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,506
    • http://SKaero.com/
Re: switching from squirrelmail, but roundcube not communicating
« Reply #3 on: December 23, 2018, 02:41:58 PM »
What host did you setup the mysql user to use? Do you have any other PHP connecting to mysql?

If you run the following what do you get:
Code: [Select]
openssl s_client -connect imap.ge.xfinity.com:993 -crlf

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #4 on: December 23, 2018, 04:16:19 PM »
$ openssl s_client -connect imap.ge.xfinity.com:993 -crlf
CONNECTED(00000003)
depth=2 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Certification Authority
verify return:1
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Organization Validation Secure Server CA
verify return:1
depth=0 C = US, postalCode = 19103, ST = PA, L = Philadelphia, street = 1 Comcast Center, O = Comcast Corporation, OU = NSO, OU = Hosted by Comcast Corporation, OU = Unified Communications, CN = imap.email.comcast.net
verify return:1
---
Certificate chain
 0 s:/C=US/postalCode=19103/ST=PA/L=Philadelphia/street=1 Comcast Center/O=Comcast Corporation/OU=NSO/OU=Hosted by Comcast Corporation/OU=Unified Communications/CN=imap.email.comcast.net
   i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Organization Validation Secure Server CA
 1 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Organization Validation Secure Server CA
   i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Certification Authority
 2 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Certification Authority
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
 3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIIPjCCByagAwIBAgIQZCycOeQWDAsQ5tJS3NB6TjANBgkqhkiG9w0BAQsFADCB
ljELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N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xeSL
BGzWAiEA2Cp8YFWQbogne3h6Llg9Xwbo8hxSHrmJHgyieYXfsN8AdgDwlaRZ8gDR
gkAQLS+TiI6tS/4dR+OZ4dA0prCoqo6ycwAAAWbk5BYJAAAEAwBHMEUCIGHMO3Lz
08S1I1M9LuWMrh9k2uy2oYU/EfBH8gVxDynCAiEA8ZdwEPImjqDsSkZE6Pa2A2gc
E8pWImgbxCVMStPvK30wDQYJKoZIhvcNAQELBQADggEBABU2u5lcUNyfwoSLJUgs
kIeBfG8qAGQMZ1zMsE4BFJoHk+LAWHEBZcTSvZ0fDaEYnpcwxrJUVd+8Em8v/zk+
67qA1KQtstATsYMSc0JM8JaZ6SUgZpXLWHMqWAo0DMtiTxk9dPRyb4pxzwucn6Wh
LDNQlEK6OkXNU+niObPeedltRguvfhD3a1B4uzRKD7IrSf+ylW07lCQxchYbRgrb
j2ysuqZ3wf4VqBICmF1ayIZrA+4MGz1QrXjyVAGIMQmK2KIAjLHfpzG4LSxu0iF0
lIqpGsnadIHFJpg5d7P9qj9kgerZYTbBZYoa/osCN/x/IG6pyLQkoAslYTHZiDZ9
BHs=
-----END CERTIFICATE-----
subject=/C=US/postalCode=19103/ST=PA/L=Philadelphia/street=1 Comcast Center/O=Comcast Corporation/OU=NSO/OU=Hosted by Comcast Corporation/OU=Unified Communications/CN=imap.email.comcast.net
issuer=/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Organization Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: ECDH, P-384, 384 bits
---
SSL handshake has read 6845 bytes and written 334 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: E7AF27584A61019C12D234904A4914971B67EDFE4A17D698B84D7C2411536600
    Session-ID-ctx:
    Master-Key: DF440ABCF15B1CE2466C3BF7BD2854C8E03CDACF7DA494FC0707B150D6B5002F752B681BC0732AF2AAF22D7E8DB7586F
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 300 (seconds)
    TLS session ticket:
    0000 - f8 c2 9d a0 58 3b 28 3a-97 3d 68 89 af 8c c2 cd   ....X;(:.=h.....
    0010 - dd ff bd 27 6d 91 92 cc-ca 6f d2 bc 57 5b 93 e0   ...'m....o..W[..
    0020 - 26 3f aa e9 c3 ee e2 57-33 8e 71 a5 ba 5e 9a cf   &?.....W3.q..^..
    0030 - aa d5 18 f7 9b 44 21 e6-f1 8b 18 a1 f3 04 15 b6   .....D!.........
    0040 - 14 eb 58 91 31 b5 8e 7c-e5 87 b5 c9 c3 87 72 5f   ..X.1..|......r_
    0050 - 6e 84 43 c6 78 98 b4 a3-11 89 3f 08 b4 2a d5 9a   n.C.x.....?..*..
    0060 - 8e c0 14 fa 00 af 41 e2-27 f4 f4 11 31 91 86 3d   ......A.'...1..=
    0070 - 70 3e 07 62 28 ab 88 29-64 69 e1 d7 ea 6c c2 a6   p>.b(..)di...l..
    0080 - 5f 23 f7 58 ce ff 43 fc-75 0e ae 5d dd f1 10 70   _#.X..C.u..]...p
    0090 - 5b 25 e8 0a eb 93 48 95-a5 69 74 a5 8f 3d 14 9f   [%....H..it..=..

    Start Time: 1545599590
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: no
---
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN AUTH=OAUTHBEARER AUTH=XOAUTH2] Dovecot ready.



Again, thank you all for your help. As you can see, all of these checks work properly, but still roundcube is not working.

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #5 on: December 24, 2018, 01:18:09 PM »
I'm guessing. Is it possible something is screwy with my PHP installation? Afterall, I switched to roundcube after something failed with squirralmail and it, too, is PHP based.

How could I test my PHP scripts, given that the tests for mariadb/roundcubedb and openssl to comcast came back OK?

Offline rm13

  • Full Member
  • ***
  • Posts: 129
Re: switching from squirrelmail, but roundcube not communicating
« Reply #6 on: December 27, 2018, 04:18:17 PM »
From the first post:
Code: [Select]
IMAP connect:  NOT OK(Login failed for johnzbesko ...
Did you edit that? I would expect johnzbesko@xfin***.com or something similar as xfinity would most likely have the user login as a full email address.


Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #7 on: December 28, 2018, 05:23:52 PM »
"Did you edit that?" No, I simply entered the suggested commands. Comcast is a bit screwy- their website advises using imap.comcast.net, however, that does not work for my evolution email client on my Kubuntu 18.04 desktop. Debugging that problem lead to the imap.ge.xfinity.com address- so I tried imap.ge.xfinity.com for roundcube (and squirrelmail before that.)

Would it be possible to execute portions of the roundcube PHP code to see what it is choking on? For example, a piece of code that establishes the mysql connection, or the imap login?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,506
    • http://SKaero.com/
Re: switching from squirrelmail, but roundcube not communicating
« Reply #8 on: December 28, 2018, 07:50:01 PM »
I though I had responded but I guess I didn't. I'm thinking that is maybe some sort of problem with PHP since you can't seem to connect to anything else. Do you have any other PHP applications on the server that successfully connect to MySQL?

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #9 on: December 28, 2018, 08:30:05 PM »
Well, I can try PHPadmin. If it doesn't work, I can bug a different forum... ;)

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #10 on: December 29, 2018, 05:55:02 PM »
OK, so I got phpMyAdmin working and I am able to log into roundcubedb as roundcube (with my password.) phpMyAdmin shows a database with a bunch of tables, such as 'cache', cache_index', etc. However, roundcube (the web application) still is unable to connect. Examining roundcubedb with phpMyAdmin shows empty tables, including for 'users'.

I check my config.inc.php by using the roundcube/installer/index.php page. I can make text edit changes as 'sudo' to /usr/share/roundcube/config/config.inc.php and see them reflected in http://localhost/roundcube/installer/index.php?_step=2

But, still, roundcube ain't working!

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,506
    • http://SKaero.com/
Re: switching from squirrelmail, but roundcube not communicating
« Reply #11 on: December 31, 2018, 03:58:28 PM »
Its interesting that phpMyAdmin works and that you see the Roundcube tables in the database. If you see the tables in the database that means that the installer was able to connect to the database and run the table creation scripts so I'm not sure why it would be saying it can't connect. If you go to the main Roundcube login page does it give you a database error?

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #12 on: December 31, 2018, 05:24:12 PM »
Yes, running:

http://localhost/roundcube/index.php

gives the

DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

I'm not a PHP expert. Is there a way to trace through the program? Is there some sort of permissions issue, or maybe a proper user issue (e.g. ispapps, mysql, etc.?)

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,506
    • http://SKaero.com/
Re: switching from squirrelmail, but roundcube not communicating
« Reply #13 on: January 03, 2019, 12:23:38 AM »
The only difference I can think of between phpMyAdmin and Roundcube is that phpMyAdmin uses the mysqli extension and Roundcube uses the pdo system. However I still find it odd that the Roundcube database tables where loaded since if the installer did that then it should have already connected to the database. Is there anyway you could give me access so I could see what is happening? I think that maybe the fastest way to diagnosis the problem.

Offline johnzbesko

  • Jr. Member
  • **
  • Posts: 20
Re: switching from squirrelmail, but roundcube not communicating
« Reply #14 on: January 04, 2019, 12:02:54 AM »
Not quite sure how I would give you access. Anyhow, are there bits of roundcube code I could step through? I would rather learn for myself  than just watch someone else fix my problem.

Maybe a bit of PHP code that simply logs into roundcubedb and dumps out the names of the tables.

Thanks for your help!