Community Discussions and Support
Mercury I & Roundcube problem

Hello All,


coming back to Mercury I did a test install with Mercury 4.91 and Roundcube 1.5. Can't use Roundcube 1.6 as the webserver is still running php5.6.40. After install I ran into the following problem:


According to Mercury session log and roundcube imap log I get a * LIST (\Noselect) "/" "" error. User is directly successfully loged out.


Both logs are the same as shown below


[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] Connecting to 192.168.100.31:143...
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] S: OK mail.test.ca IMAP4rev1 Mercury/32 v4.90.299 server ready.
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] C: A0001 CAPABILITY
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] S:
CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] S: A0001 OK CAPABILITY complete.
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] C: A0002 AUTHENTICATE PLAIN
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] S: +
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] C: ** [18]
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] S: A0002 OK AUTHENTICATE completed.
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] C: A0003 LIST "" ""
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] S: LIST (\Noselect) "/" ""
[05-Feb-2023 18:55:08 -0600]: <fbaqiuum> [8273] S: A0003 OK LIST completed.
[05-Feb-2023 18:55:08 -0600]: <k3ji8448> [8273] C: A0004 LOGOUT
[05-Feb-2023 18:55:08 -0600]: <k3ji8448> [8273] S:
BYE IMAP4rev1 server terminating connection.
[05-Feb-2023 18:55:08 -0600]: <k3ji8448> [8273] S: A0004 OK LOGOUT completed.


Assuming that I am missing, or have wrong settings in some config settings in Roundcube.
Looking through the forum posts, my particular problem did not come up.
Maybe someone could point me in the right direction.


BTW, Squirrelmail is working fine, but wanted to offer my users something different.


Johannes


Hello All, coming back to Mercury I did a test install with Mercury 4.91 and Roundcube 1.5. Can&#039;t use Roundcube 1.6 as the webserver is still running php5.6.40. After install I ran into the following problem: According to Mercury session log and roundcube imap log I get a * LIST (\Noselect) &quot;/&quot; &quot;&quot; error. User is directly successfully loged out. Both logs are the same as shown below [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] Connecting to 192.168.100.31:143... [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] S: * OK mail.test.ca IMAP4rev1 Mercury/32 v4.90.299 server ready. [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] C: A0001 CAPABILITY [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1 [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] S: A0001 OK CAPABILITY complete. [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] C: A0002 AUTHENTICATE PLAIN [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] S: + [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] C: ****** [18] [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] S: A0002 OK AUTHENTICATE completed. [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] C: A0003 LIST &quot;&quot; &quot;&quot; [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] S: * LIST (\Noselect) &quot;/&quot; &quot;&quot; [05-Feb-2023 18:55:08 -0600]: &lt;fbaqiuum&gt; [8273] S: A0003 OK LIST completed. [05-Feb-2023 18:55:08 -0600]: &lt;k3ji8448&gt; [8273] C: A0004 LOGOUT [05-Feb-2023 18:55:08 -0600]: &lt;k3ji8448&gt; [8273] S: * BYE IMAP4rev1 server terminating connection. [05-Feb-2023 18:55:08 -0600]: &lt;k3ji8448&gt; [8273] S: A0004 OK LOGOUT completed. Assuming that I am missing, or have wrong settings in some config settings in Roundcube. Looking through the forum posts, my particular problem did not come up. Maybe someone could point me in the right direction. BTW, Squirrelmail is working fine, but wanted to offer my users something different. Johannes

I don't know how or if I can help you, but I had Roundcube 1.5 running with Mercury 4.90 before without any problems. Currently using Roundcube 1.6 and Mercury 4.91, and no problems. In the past I also ran SquirrelMail, but once Roundcube was working I removed it.


I'm not sure that the line with Noselect is an error. I looked at a session log on Mercury and I have one line with Noselect that says:
09:52:02.426: << * LIST (\Noselect) "/" "Recent search results"<cr><lf>


Is it possible that your Noselect line is finding a folder without a name?


Does this happen for all users, or just one or some?


One other observation, you mention a test install with 4.91, but your log shows 4.90. Probably not significant...


Tony


I don&#039;t know how or if I can help you, but I had Roundcube 1.5 running with Mercury 4.90 before without any problems. Currently using Roundcube 1.6 and Mercury 4.91, and no problems. In the past I also ran SquirrelMail, but once Roundcube was working I removed it. I&#039;m not sure that the line with Noselect is an error. I looked at a session log on Mercury and I have one line with Noselect that says: 09:52:02.426: &lt;&lt; * LIST (\Noselect) &quot;/&quot; &quot;Recent search results&quot;&lt;cr&gt;&lt;lf&gt; Is it possible that your Noselect line is finding a folder without a name? Does this happen for all users, or just one or some? One other observation, you mention a test install with 4.91, but your log shows 4.90. Probably not significant... Tony

After I replied, I enabled IMAP debugging on Roundcube, and the log shows that RC logs out after loading folders.


After logging in to Roundcube, look in Settings, Special Folders to match IMAP folders to RC folders?


Tony


After I replied, I enabled IMAP debugging on Roundcube, and the log shows that RC logs out after loading folders. After logging in to Roundcube, look in Settings, Special Folders to match IMAP folders to RC folders? Tony

Hi Tony,


thank you for your reply.
Yes, the testing system is Mercury 4.9.0, mentioned that wrong in my post.
This is a test setup as I have to install a new system from scratch.


The user has the initial folders which were created by Pegasus mail. I can acces them in Pegasus and in Squirrelmail.


The login / Logout happens so fast, that I only get a "Session logout" message right after login. There is no chance even to go into RC to look at the Settings.


I will post later today, as I am not right now at the test machine, the config file of RC, as I assume that I have there some wrong or missing settings in regards to the Folder delimiter.


Maybe that will give some clues ?


Hi Tony, thank you for your reply. Yes, the testing system is Mercury 4.9.0, mentioned that wrong in my post. This is a test setup as I have to install a new system from scratch. The user has the initial folders which were created by Pegasus mail. I can acces them in Pegasus and in Squirrelmail. The login / Logout happens so fast, that I only get a &quot;Session logout&quot; message right after login. There is no chance even to go into RC to look at the Settings. I will post later today, as I am not right now at the test machine, the config file of RC, as I assume that I have there some wrong or missing settings in regards to the Folder delimiter. Maybe that will give some clues ?

I really think the problem is not in the log you have posted here. When I login with Roundcube, the log starts out almost exactly like the log you posted:


[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] Connecting to 192.168.1.5:143...
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] S: * OK mail.personamedical.com IMAP4rev1 Mercury/32 v4.91.301 server ready.
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] C: A0001 CAPABILITY
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] S: A0001 OK CAPABILITY complete.
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] C: A0002 CAPABILITY
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] S: A0002 OK CAPABILITY complete.
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] C: A0003 AUTHENTICATE PLAIN
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] S: +
[07-Feb-2023 17:34:11 -0500]: <cpqf45o5> [9530] C: ****** [58]
[07-Feb-2023 17:34:19 -0500]: <cpqf45o5> [9530] S: A0003 OK AUTHENTICATE completed.
[07-Feb-2023 17:34:19 -0500]: <cpqf45o5> [9530] C: A0004 LIST "" ""
[07-Feb-2023 17:34:19 -0500]: <cpqf45o5> [9530] S: * LIST (\Noselect) "/" ""
[07-Feb-2023 17:34:19 -0500]: <cpqf45o5> [9530] S: A0004 OK LIST completed.
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [9530] C: A0005 LOGOUT
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [9530] S: * BYE IMAP4rev1 server terminating connection.
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [9530] S: A0005 OK LOGOUT completed.
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [FAE7] Connecting to 192.168.1.5:143...
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [FAE7] S: * OK mail.personamedical.com IMAP4rev1 Mercury/32 v4.91.301 server ready.
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [FAE7] C: A0001 CAPABILITY
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [FAE7] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [FAE7] S: A0001 OK CAPABILITY complete.
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [FAE7] C: A0002 CAPABILITY
[07-Feb-2023 17:34:19 -0500]: <b9lb4u6p> [FAE7] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1

But, the difference is after the logout completes, it immediately connects again and performs another action.


I vaguely remember initially having a problem with the database connection or a permission problem. It was too long ago to recall the details, and the logs don't go back that far.


Have you checked the other Roundcube logs? Might be a hint in one of them.


Tony


I really think the problem is not in the log you have posted here. When I login with Roundcube, the log starts out almost exactly like the log you posted: ```` [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] Connecting to 192.168.1.5:143... [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] S: * OK mail.personamedical.com IMAP4rev1 Mercury/32 v4.91.301 server ready. [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] C: A0001 CAPABILITY [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1 [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] S: A0001 OK CAPABILITY complete. [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] C: A0002 CAPABILITY [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1 [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] S: A0002 OK CAPABILITY complete. [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] C: A0003 AUTHENTICATE PLAIN [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] S: + [07-Feb-2023 17:34:11 -0500]: &lt;cpqf45o5&gt; [9530] C: ****** [58] [07-Feb-2023 17:34:19 -0500]: &lt;cpqf45o5&gt; [9530] S: A0003 OK AUTHENTICATE completed. [07-Feb-2023 17:34:19 -0500]: &lt;cpqf45o5&gt; [9530] C: A0004 LIST &quot;&quot; &quot;&quot; [07-Feb-2023 17:34:19 -0500]: &lt;cpqf45o5&gt; [9530] S: * LIST (\Noselect) &quot;/&quot; &quot;&quot; [07-Feb-2023 17:34:19 -0500]: &lt;cpqf45o5&gt; [9530] S: A0004 OK LIST completed. [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [9530] C: A0005 LOGOUT [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [9530] S: * BYE IMAP4rev1 server terminating connection. [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [9530] S: A0005 OK LOGOUT completed. [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [FAE7] Connecting to 192.168.1.5:143... [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [FAE7] S: * OK mail.personamedical.com IMAP4rev1 Mercury/32 v4.91.301 server ready. [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [FAE7] C: A0001 CAPABILITY [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [FAE7] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1 [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [FAE7] S: A0001 OK CAPABILITY complete. [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [FAE7] C: A0002 CAPABILITY [07-Feb-2023 17:34:19 -0500]: &lt;b9lb4u6p&gt; [FAE7] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1 ```` But, the difference is after the logout completes, it immediately connects again and performs another action. I vaguely remember initially having a problem with the database connection or a permission problem. It was too long ago to recall the details, and the logs don&#039;t go back that far. Have you checked the other Roundcube logs? Might be a hint in one of them. Tony

Tony,


I checked Mysql, the user is added and I noticed as well a connection in Mercury-I live screen a connection from Mysql. RC imap log and Mercury imap session log show the same results.


Mercury session


19:37:53.862: --- 7 Feb 2023, 19:37:53.862 ---
19:37:53.864: Accepted connection from '192.168.200.35', port 143, timeout 120 secs.
19:37:53.866: Connection from 192.168.200.35, Tue, 07 Feb 2023 19:37<cr><lf>
19:37:53.870: << * OK mail.xxxxxx.ca IMAP4rev1 Mercury/32 v4.90.299 server ready.<cr><lf>
19:37:53.872: >> A0001 CAPABILITY<cr><lf>
19:37:53.873: << * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1<cr><lf>
19:37:53.874: << A0001 OK CAPABILITY complete.<cr><lf>
19:37:53.875: >> A0002 AUTHENTICATE PLAIN<cr><lf>
19:37:53.876: << +<cr><lf>
19:37:53.878: >> AG1lcmN1cnlAeW9ya3RvbmRpZ2l0YWwuY2EAaGFycmlz<cr><lf>
19:37:53.885: << A0002 OK AUTHENTICATE completed.<cr><lf>
19:37:53.892: >> A0003 LIST "" ""<cr><lf>
19:37:53.893: << * LIST (\Noselect) "/" ""<cr><lf>
19:37:53.893: << A0003 OK LIST completed.<cr><lf>
19:37:53.969: >> A0004 LOGOUT<cr><lf>
19:37:53.977: << * BYE IMAP4rev1 server terminating connection.<cr><lf>
19:37:53.978: << A0004 OK LOGOUT completed.<cr><lf>
19:37:53.982: --- Connection closed at 7 Feb 2023, 19:37:53.982. ---
19:37:53.983:

RC imap


[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] Connecting to 192.168.100.31:143...
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] S: * OK mail.xxxxxxx.ca IMAP4rev1 Mercury/32 v4.90.299 server ready.
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] C: A0001 CAPABILITY
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] S: A0001 OK CAPABILITY complete.
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] C: A0002 AUTHENTICATE PLAIN
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] S: +
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] C: ****** [42]
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] S: A0002 OK AUTHENTICATE completed.
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] C: A0003 LIST "" ""
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] S: * LIST (\Noselect) "/" ""
[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> [3D64] S: A0003 OK LIST completed.
[07-Feb-2023 19:34:41 -0600]: <jctuk09m> [3D64] C: A0004 LOGOUT
[07-Feb-2023 19:34:41 -0600]: <jctuk09m> [3D64] S: * BYE IMAP4rev1 server terminating connection.
[07-Feb-2023 19:34:41 -0600]: <jctuk09m> [3D64] S: A0004 OK LOGOUT completed.

RC session log


[07-Feb-2023 19:34:41 -0600]: <55qbn8vu> Session destroy: 55qbn8vu6tihcm155noi6u42i2
[07-Feb-2023 19:34:41 -0600]: <jctuk09m> Session regenerate: 55qbn8vu6tihcm155noi6u42i2 -> jctuk09meu5d4de1kq9pa9rfr2
[07-Feb-2023 19:34:41 -0600]: <jctuk09m> Session auth check failed for jctuk09meu5d4de1kq9pa9rfr2; timeslot = 2023-02-07 19:30:00
[07-Feb-2023 19:34:41 -0600]: <jctuk09m> Session authentication failed for jctuk09meu5d4de1kq9pa9rfr2; invalid auth cookie sent; timeslot = 2023-02-07 19:20:00
[07-Feb-2023 19:34:41 -0600]: <jctuk09m> Session destroy: jctuk09meu5d4de1kq9pa9rfr2

I am just wondering about the failed session authentication. And that must be the connection from Mysql as it shows in Mercury-I ive window a 0 sec. connection.
Not sure why/what this is, as other php application with sessions don't show any problems.


So, further digging is required.


Just to make sure, below is my RC config. Maybe you can compare and spot some incorrect settings ?


<?php

/* Local configuration for Roundcube Webmail */

// ----------------------------------

// SQL DATABASE

// ----------------------------------

// Database connection string (DSN) for read+write operations

// Format (compatible with PEAR MDB2): db_provider://user:password@host/database

// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle

// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php

// Note: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'

// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'

// Note: Various drivers support various additional arguments for connection,

// for Mysql: key, cipher, cert, capath, ca, verify_server_cert,

// for Postgres: application_name, sslmode, sslcert, sslkey, sslrootcert, sslcrl, sslcompression, service.

// e.g. 'mysql://roundcube:@localhost/roundcubemail?verify_server_cert=false'

$config['db_dsnw'] = 'mysql://xxx:yyyyy@192.168.100.30/roundcube';

// ----------------------------------

// IMAP

// ----------------------------------

// The IMAP host chosen to perform the log-in.

// Leave blank to show a textbox at login, give a list of hosts

// to display a pulldown menu or set one host as string.

// Enter hostname with prefix ssl:// to use Implicit TLS, or use

// prefix tls:// to use STARTTLS.

// Supported replacement variables:

// %n - hostname ($_SERVER['SERVER_NAME'])

// %t - hostname without the first part

// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)

// %s - domain name after the '@' from e-mail address provided at login screen

// For example %n = mail.domain.tld, %t = domain.tld

// WARNING: After hostname change update of mail_host column in users table is

// required to match old user data records with the new host.

$config['default_host'] = '192.168.100.31';

// IMAP authentication method (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null).
// Use 'IMAP' to authenticate with IMAP LOGIN command.
// By default the most secure method (from supported) will be selected.
$config['imap_auth_type'] = 'PLAIN';

// Some servers do not support folders with both folders and messages inside
// If your server supports that use true, if it does not, use false.
// By default it will be determined automatically (once per user session).
$config['imap_dual_use_folders'] = true;



// ----------------------------------

// SMTP

// ----------------------------------

// SMTP server host (for sending mails).

// Enter hostname with prefix ssl:// to use Implicit TLS, or use

// prefix tls:// to use STARTTLS.

// Supported replacement variables:

// %h - user's IMAP hostname

// %n - hostname ($_SERVER['SERVER_NAME'])

// %t - hostname without the first part

// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)

// %z - IMAP domain (IMAP hostname without the first part)

// For example %n = mail.domain.tld, %t = domain.tld

// To specify different SMTP servers for different IMAP hosts provide an array

// of IMAP host (no prefix or port) and SMTP server e.g. ['imap.example.com' => 'smtp.example.net']

$config['smtp_server'] = '192.168.100.31';

// SMTP port. Use 25 for cleartext, 465 for Implicit TLS, or 587 for STARTTLS (default)

$config['smtp_port'] = 25;

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$config['smtp_auth_type'] = 'PLAIN';

// ----------------------------------
// SYSTEM
// ----------------------------------

// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
$config['enable_installer'] = false;

// Automatically register user in Roundcube database on successful (IMAP) logon.
// Set to false if only registered users should be allowed to the webmail.
// Note: If disabled you have to create records in Roundcube users table by yourself.
// Note: Roundcube does not manage/create users on a mail server.
$config['auto_create_user'] = true;

// provide an URL where a user can get support for this Roundcube installation

// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!

$config['support_url'] = 'https://www.xxxxxxx.ca/care.stm';

// This key is used for encrypting purposes, like storing of imap password

// in the session. For historical reasons it's called DES_key, but it's used

// with any configured cipher_method (see below).

// For the default cipher_method a required key length is 24 characters.

$config['des_key'] = 'ZG1OBfvVs1mtT4cpTeYRgTIO';

// Automatically add this domain to user names for login

// Only for IMAP servers that require full e-mail addresses for login

// Specify an array with 'host' => 'domain' values to support multiple hosts

// Supported replacement variables:

// %h - user's IMAP hostname

// %n - hostname ($_SERVER['SERVER_NAME'])

// %t - hostname without the first part

// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)

// %z - IMAP domain (IMAP hostname without the first part)

// For example %n = mail.domain.tld, %t = domain.tld

$config['username_domain'] = '';

// Name your service. This is displayed on the login screen and in the window title

$config['product_name'] = 'Webmail';

// Set identities access level:

// 0 - many identities with possibility to edit all params

// 1 - many identities with possibility to edit all params but not email address

// 2 - one identity with possibility to edit all params

// 3 - one identity with possibility to edit all params but not email address

// 4 - one identity with possibility to edit only signature

$config['identities_level'] = 3;

// Default extension used for log file name
$config['log_file_ext'] = '.log';

// Log successful/failed logins to <log_dir>/userlogins.log or to syslog
$config['log_logins'] = true;

// Log IMAP conversation to <log_dir>/imap.log or to syslog
$config['imap_debug'] = true;

// Log session debug information/authentication errors to <log_dir>/session.log or to syslog
$config['session_debug'] = true;




// ----------------------------------

// PLUGINS

// ----------------------------------

// List of active plugins (in plugins/ directory)

$config['plugins'] = [];

// the default locale setting (leave empty for auto-detection)

// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR

$config['language'] = 'en_US';

// store spam messages in this mailbox

// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)

$config['junk_mbox'] = 'spam';

// store sent message is this mailbox

// leave blank if sent messages should not be stored

// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)

$config['sent_mbox'] = 'sent';

// move messages to this folder when deleting them

// leave blank if they should be deleted directly

// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)

$config['trash_mbox'] = 'trash';

// compose html formatted messages by default

// 0 - never,

// 1 - always,

// 2 - on reply to HTML message,

// 3 - on forward or reply to HTML message

// 4 - always, except when replying to plain text message

$config['htmleditor'] = 2;

// save compose message every 300 seconds (5min)

$config['draft_autosave'] = 0;

// Encoding of long/non-ascii attachment names:

// 0 - Full RFC 2231 compatible (Thunderbird's default & Roundcube)

// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (MS Outlook , OE)

// 2 - Full 2047 compatible (depreciated)

$config['mime_param_folding'] = 0;

Thank you for your patience and suggestions.


Johannes


Tony, I checked Mysql, the user is added and I noticed as well a connection in Mercury-I live screen a connection from Mysql. RC imap log and Mercury imap session log show the same results. Mercury session ```` 19:37:53.862: --- 7 Feb 2023, 19:37:53.862 --- 19:37:53.864: Accepted connection from &#039;192.168.200.35&#039;, port 143, timeout 120 secs. 19:37:53.866: Connection from 192.168.200.35, Tue, 07 Feb 2023 19:37&lt;cr&gt;&lt;lf&gt; 19:37:53.870: &lt;&lt; * OK mail.xxxxxx.ca IMAP4rev1 Mercury/32 v4.90.299 server ready.&lt;cr&gt;&lt;lf&gt; 19:37:53.872: &gt;&gt; A0001 CAPABILITY&lt;cr&gt;&lt;lf&gt; 19:37:53.873: &lt;&lt; * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1&lt;cr&gt;&lt;lf&gt; 19:37:53.874: &lt;&lt; A0001 OK CAPABILITY complete.&lt;cr&gt;&lt;lf&gt; 19:37:53.875: &gt;&gt; A0002 AUTHENTICATE PLAIN&lt;cr&gt;&lt;lf&gt; 19:37:53.876: &lt;&lt; +&lt;cr&gt;&lt;lf&gt; 19:37:53.878: &gt;&gt; AG1lcmN1cnlAeW9ya3RvbmRpZ2l0YWwuY2EAaGFycmlz&lt;cr&gt;&lt;lf&gt; 19:37:53.885: &lt;&lt; A0002 OK AUTHENTICATE completed.&lt;cr&gt;&lt;lf&gt; 19:37:53.892: &gt;&gt; A0003 LIST &quot;&quot; &quot;&quot;&lt;cr&gt;&lt;lf&gt; 19:37:53.893: &lt;&lt; * LIST (\Noselect) &quot;/&quot; &quot;&quot;&lt;cr&gt;&lt;lf&gt; 19:37:53.893: &lt;&lt; A0003 OK LIST completed.&lt;cr&gt;&lt;lf&gt; 19:37:53.969: &gt;&gt; A0004 LOGOUT&lt;cr&gt;&lt;lf&gt; 19:37:53.977: &lt;&lt; * BYE IMAP4rev1 server terminating connection.&lt;cr&gt;&lt;lf&gt; 19:37:53.978: &lt;&lt; A0004 OK LOGOUT completed.&lt;cr&gt;&lt;lf&gt; 19:37:53.982: --- Connection closed at 7 Feb 2023, 19:37:53.982. --- 19:37:53.983: ```` RC imap ```` [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] Connecting to 192.168.100.31:143... [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] S: * OK mail.xxxxxxx.ca IMAP4rev1 Mercury/32 v4.90.299 server ready. [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] C: A0001 CAPABILITY [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=PLAIN X-MERCURY-1 [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] S: A0001 OK CAPABILITY complete. [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] C: A0002 AUTHENTICATE PLAIN [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] S: + [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] C: ****** [42] [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] S: A0002 OK AUTHENTICATE completed. [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] C: A0003 LIST &quot;&quot; &quot;&quot; [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] S: * LIST (\Noselect) &quot;/&quot; &quot;&quot; [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; [3D64] S: A0003 OK LIST completed. [07-Feb-2023 19:34:41 -0600]: &lt;jctuk09m&gt; [3D64] C: A0004 LOGOUT [07-Feb-2023 19:34:41 -0600]: &lt;jctuk09m&gt; [3D64] S: * BYE IMAP4rev1 server terminating connection. [07-Feb-2023 19:34:41 -0600]: &lt;jctuk09m&gt; [3D64] S: A0004 OK LOGOUT completed. ```` RC session log ```` [07-Feb-2023 19:34:41 -0600]: &lt;55qbn8vu&gt; Session destroy: 55qbn8vu6tihcm155noi6u42i2 [07-Feb-2023 19:34:41 -0600]: &lt;jctuk09m&gt; Session regenerate: 55qbn8vu6tihcm155noi6u42i2 -&gt; jctuk09meu5d4de1kq9pa9rfr2 [07-Feb-2023 19:34:41 -0600]: &lt;jctuk09m&gt; Session auth check failed for jctuk09meu5d4de1kq9pa9rfr2; timeslot = 2023-02-07 19:30:00 [07-Feb-2023 19:34:41 -0600]: &lt;jctuk09m&gt; Session authentication failed for jctuk09meu5d4de1kq9pa9rfr2; invalid auth cookie sent; timeslot = 2023-02-07 19:20:00 [07-Feb-2023 19:34:41 -0600]: &lt;jctuk09m&gt; Session destroy: jctuk09meu5d4de1kq9pa9rfr2 ```` I am just wondering about the failed session authentication. And that must be the connection from Mysql as it shows in Mercury-I ive window a 0 sec. connection. Not sure why/what this is, as other php application with sessions don&#039;t show any problems. So, further digging is required. Just to make sure, below is my RC config. Maybe you can compare and spot some incorrect settings ? ```` &lt;?php /* Local configuration for Roundcube Webmail */ // ---------------------------------- // SQL DATABASE // ---------------------------------- // Database connection string (DSN) for read+write operations // Format (compatible with PEAR MDB2): db_provider://user:password@host/database // Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle // For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php // Note: for SQLite use absolute path (Linux): &#039;sqlite:////full/path/to/sqlite.db?mode=0646&#039; // or (Windows): &#039;sqlite:///C:/full/path/to/sqlite.db&#039; // Note: Various drivers support various additional arguments for connection, // for Mysql: key, cipher, cert, capath, ca, verify_server_cert, // for Postgres: application_name, sslmode, sslcert, sslkey, sslrootcert, sslcrl, sslcompression, service. // e.g. &#039;mysql://roundcube:@localhost/roundcubemail?verify_server_cert=false&#039; $config[&#039;db_dsnw&#039;] = &#039;mysql://xxx:yyyyy@192.168.100.30/roundcube&#039;; // ---------------------------------- // IMAP // ---------------------------------- // The IMAP host chosen to perform the log-in. // Leave blank to show a textbox at login, give a list of hosts // to display a pulldown menu or set one host as string. // Enter hostname with prefix ssl:// to use Implicit TLS, or use // prefix tls:// to use STARTTLS. // Supported replacement variables: // %n - hostname ($_SERVER[&#039;SERVER_NAME&#039;]) // %t - hostname without the first part // %d - domain (http hostname $_SERVER[&#039;HTTP_HOST&#039;] without the first part) // %s - domain name after the &#039;@&#039; from e-mail address provided at login screen // For example %n = mail.domain.tld, %t = domain.tld // WARNING: After hostname change update of mail_host column in users table is // required to match old user data records with the new host. $config[&#039;default_host&#039;] = &#039;192.168.100.31&#039;; // IMAP authentication method (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null). // Use &#039;IMAP&#039; to authenticate with IMAP LOGIN command. // By default the most secure method (from supported) will be selected. $config[&#039;imap_auth_type&#039;] = &#039;PLAIN&#039;; // Some servers do not support folders with both folders and messages inside // If your server supports that use true, if it does not, use false. // By default it will be determined automatically (once per user session). $config[&#039;imap_dual_use_folders&#039;] = true; // ---------------------------------- // SMTP // ---------------------------------- // SMTP server host (for sending mails). // Enter hostname with prefix ssl:// to use Implicit TLS, or use // prefix tls:// to use STARTTLS. // Supported replacement variables: // %h - user&#039;s IMAP hostname // %n - hostname ($_SERVER[&#039;SERVER_NAME&#039;]) // %t - hostname without the first part // %d - domain (http hostname $_SERVER[&#039;HTTP_HOST&#039;] without the first part) // %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %t = domain.tld // To specify different SMTP servers for different IMAP hosts provide an array // of IMAP host (no prefix or port) and SMTP server e.g. [&#039;imap.example.com&#039; =&gt; &#039;smtp.example.net&#039;] $config[&#039;smtp_server&#039;] = &#039;192.168.100.31&#039;; // SMTP port. Use 25 for cleartext, 465 for Implicit TLS, or 587 for STARTTLS (default) $config[&#039;smtp_port&#039;] = 25; // SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use // best server supported one) $config[&#039;smtp_auth_type&#039;] = &#039;PLAIN&#039;; // ---------------------------------- // SYSTEM // ---------------------------------- // THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA. // ONLY ENABLE IT IF YOU&#039;RE REALLY SURE WHAT YOU&#039;RE DOING! $config[&#039;enable_installer&#039;] = false; // Automatically register user in Roundcube database on successful (IMAP) logon. // Set to false if only registered users should be allowed to the webmail. // Note: If disabled you have to create records in Roundcube users table by yourself. // Note: Roundcube does not manage/create users on a mail server. $config[&#039;auto_create_user&#039;] = true; // provide an URL where a user can get support for this Roundcube installation // PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE! $config[&#039;support_url&#039;] = &#039;https://www.xxxxxxx.ca/care.stm&#039;; // This key is used for encrypting purposes, like storing of imap password // in the session. For historical reasons it&#039;s called DES_key, but it&#039;s used // with any configured cipher_method (see below). // For the default cipher_method a required key length is 24 characters. $config[&#039;des_key&#039;] = &#039;ZG1OBfvVs1mtT4cpTeYRgTIO&#039;; // Automatically add this domain to user names for login // Only for IMAP servers that require full e-mail addresses for login // Specify an array with &#039;host&#039; =&gt; &#039;domain&#039; values to support multiple hosts // Supported replacement variables: // %h - user&#039;s IMAP hostname // %n - hostname ($_SERVER[&#039;SERVER_NAME&#039;]) // %t - hostname without the first part // %d - domain (http hostname $_SERVER[&#039;HTTP_HOST&#039;] without the first part) // %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %t = domain.tld $config[&#039;username_domain&#039;] = &#039;&#039;; // Name your service. This is displayed on the login screen and in the window title $config[&#039;product_name&#039;] = &#039;Webmail&#039;; // Set identities access level: // 0 - many identities with possibility to edit all params // 1 - many identities with possibility to edit all params but not email address // 2 - one identity with possibility to edit all params // 3 - one identity with possibility to edit all params but not email address // 4 - one identity with possibility to edit only signature $config[&#039;identities_level&#039;] = 3; // Default extension used for log file name $config[&#039;log_file_ext&#039;] = &#039;.log&#039;; // Log successful/failed logins to &lt;log_dir&gt;/userlogins.log or to syslog $config[&#039;log_logins&#039;] = true; // Log IMAP conversation to &lt;log_dir&gt;/imap.log or to syslog $config[&#039;imap_debug&#039;] = true; // Log session debug information/authentication errors to &lt;log_dir&gt;/session.log or to syslog $config[&#039;session_debug&#039;] = true; // ---------------------------------- // PLUGINS // ---------------------------------- // List of active plugins (in plugins/ directory) $config[&#039;plugins&#039;] = []; // the default locale setting (leave empty for auto-detection) // RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR $config[&#039;language&#039;] = &#039;en_US&#039;; // store spam messages in this mailbox // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) $config[&#039;junk_mbox&#039;] = &#039;spam&#039;; // store sent message is this mailbox // leave blank if sent messages should not be stored // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) $config[&#039;sent_mbox&#039;] = &#039;sent&#039;; // move messages to this folder when deleting them // leave blank if they should be deleted directly // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) $config[&#039;trash_mbox&#039;] = &#039;trash&#039;; // compose html formatted messages by default // 0 - never, // 1 - always, // 2 - on reply to HTML message, // 3 - on forward or reply to HTML message // 4 - always, except when replying to plain text message $config[&#039;htmleditor&#039;] = 2; // save compose message every 300 seconds (5min) $config[&#039;draft_autosave&#039;] = 0; // Encoding of long/non-ascii attachment names: // 0 - Full RFC 2231 compatible (Thunderbird&#039;s default &amp; Roundcube) // 1 - RFC 2047 for &#039;name&#039; and RFC 2231 for &#039;filename&#039; parameter (MS Outlook , OE) // 2 - Full 2047 compatible (depreciated) $config[&#039;mime_param_folding&#039;] = 0; ```` Thank you for your patience and suggestions. Johannes

I see you have set:


$config['imap_dual_use_folders'] = true;

I did not set that because I'm pretty sure Mercury doesn't support folders containing folders and messages. I left it at null. But I don't think that is the cause of your login problem.


I suggest you also look at your Apache error logs to see if there's anything helpful there.


Tony


I see you have set: ```` $config[&#039;imap_dual_use_folders&#039;] = true; ```` I did not set that because I&#039;m pretty sure Mercury doesn&#039;t support folders containing folders and messages. I left it at null. But I don&#039;t think that is the cause of your login problem. I suggest you also look at your Apache error logs to see if there&#039;s anything helpful there. Tony

Hi Tony,


Problem is solved. I got it working. smile


My webserver log didn't show any errors or notices and no php errors either.
After installing Apache, it worked right "out of the box". It seems that RC is very much geared toward Apache and/or NGinx. No changes in regards to the database MySql and to the config file. I just changed the "imap_dual_use_folders" setting to "false.


Thank you for your time and effort looking into my problem.


Johannes


Hi Tony, Problem is solved. I got it working. 8) My webserver log didn&#039;t show any errors or notices and no php errors either. After installing Apache, it worked right &quot;out of the box&quot;. It seems that RC is very much geared toward Apache and/or NGinx. No changes in regards to the database MySql and to the config file. I just changed the &quot;imap_dual_use_folders&quot; setting to &quot;false. Thank you for your time and effort looking into my problem. Johannes
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft