Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: chaser on June 17, 2026, 10:25:13 AM

Title: Issues logging in to hMailSever
Post by: chaser on June 17, 2026, 10:25:13 AM
Hi,

I recently had a need to re-install hMailServer, and restore the configuration. That all seems to have worked ok.

I can log into existing hMailServer accounts from Roundcube (v1.6.15) without any issues. hMailServer log:

"IMAPD" 7644 167 "2026-06-17 15:14:48.169" "192.168.0.20" "SENT: * OK IMAPrev1"
"IMAPD" 4572 167 "2026-06-17 15:14:48.169" "192.168.0.20" "RECEIVED: A0001 CAPABILITY"
"IMAPD" 4572 167 "2026-06-17 15:14:48.169" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0001 OK CAPABILITY completed"
"IMAPD" 7644 167 "2026-06-17 15:14:48.169" "192.168.0.20" "RECEIVED: A0002 STARTTLS"
"IMAPD" 7644 167 "2026-06-17 15:14:48.169" "192.168.0.20" "SENT: A0002 OK Begin TLS negotiation now"
"DEBUG" 980 "2026-06-17 15:14:48.169" "Performing SSL/TLS handshake for session 167. Verify certificate: False"
"TCPIP" 980 "2026-06-17 15:14:48.222" "TCPConnection - TLS/SSL handshake completed. Session Id: 166, Remote IP: 192.168.0.20, Version: TLSv1.2, Cipher: ECDHE-RSA-AES256-GCM-SHA384, Bits: 256"
"IMAPD" 980 166 "2026-06-17 15:14:48.223" "192.168.0.20" "RECEIVED: A0003 CAPABILITY"
"IMAPD" 980 166 "2026-06-17 15:14:48.223" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0003 OK CAPABILITY completed"
"IMAPD" 4572 166 "2026-06-17 15:14:48.225" "192.168.0.20" "RECEIVED: A0004 CAPABILITY"
"IMAPD" 4572 166 "2026-06-17 15:14:48.225" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0004 OK CAPABILITY completed"
"IMAPD" 7644 166 "2026-06-17 15:14:48.226" "192.168.0.20" "RECEIVED: A0005 LOGIN "[email protected]" ***"
"TCPIP" 980 "2026-06-17 15:14:48.230" "TCPConnection - TLS/SSL handshake completed. Session Id: 167, Remote IP: 192.168.0.20, Version: TLSv1.2, Cipher: ECDHE-RSA-AES256-GCM-SHA384, Bits: 256"
"IMAPD" 9080 167 "2026-06-17 15:14:48.230" "192.168.0.20" "RECEIVED: A0003 CAPABILITY"
"IMAPD" 9080 167 "2026-06-17 15:14:48.230" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0003 OK CAPABILITY completed"
"IMAPD" 7644 166 "2026-06-17 15:14:48.230" "192.168.0.20" "SENT: A0005 OK LOGIN completed"
"IMAPD" 980 167 "2026-06-17 15:14:48.230" "192.168.0.20" "RECEIVED: A0004 CAPABILITY"
"IMAPD" 980 167 "2026-06-17 15:14:48.230" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0004 OK CAPABILITY completed"
"IMAPD" 7644 167 "2026-06-17 15:14:48.230" "192.168.0.20" "RECEIVED: A0005 LOGIN "[email protected]" ***"
"IMAPD" 7644 167 "2026-06-17 15:14:48.230" "192.168.0.20" "SENT: A0005 OK LOGIN completed"
"IMAPD" 980 167 "2026-06-17 15:14:48.230" "192.168.0.20" "RECEIVED: A0006 LSUB "" "*""
"IMAPD" 980 167 "2026-06-17 15:14:48.230" "192.168.0.20" "SENT: * LSUB (\HasNoChildren) "." "INBOX"[nl]* LSUB (\HasNoChildren) "." "Notes"[nl]* LSUB (\HasNoChildren) "." "Deleted Messages"[nl]* LSUB (\HasNoChildren) "." "Junk E-mail"[nl]* LSUB (\HasNoChildren) "." "Sent Messages"[nl]* LSUB (\HasNoChildren) "." "Temp"[nl]* LSUB (\HasNoChildren) "." "New Messages""
"IMAPD" 980 167 "2026-06-17 15:14:48.230" "192.168.0.20" "SENT: A0006 OK LSUB completed"
"IMAPD" 980 167 "2026-06-17 15:14:48.230" "192.168.0.20" "RECEIVED: A0007 LIST "" "*""
<SNIP>

However, if I try to create a new hMailServer email account and log into that account from Roundcube I get a hMailServer 'Login failed' error:

"IMAPD" 7644 160 "2026-06-17 15:11:46.245" "192.168.0.20" "SENT: * OK IMAPrev1"
"IMAPD" 9080 160 "2026-06-17 15:11:46.245" "192.168.0.20" "RECEIVED: A0001 CAPABILITY"
"IMAPD" 9080 160 "2026-06-17 15:11:46.245" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0001 OK CAPABILITY completed"
"IMAPD" 7644 160 "2026-06-17 15:11:46.245" "192.168.0.20" "RECEIVED: A0002 STARTTLS"
"IMAPD" 7644 160 "2026-06-17 15:11:46.245" "192.168.0.20" "SENT: A0002 OK Begin TLS negotiation now"
"DEBUG" 9080 "2026-06-17 15:11:46.245" "Performing SSL/TLS handshake for session 160. Verify certificate: False"
"TCPIP" 9080 "2026-06-17 15:11:46.293" "TCPConnection - TLS/SSL handshake completed. Session Id: 160, Remote IP: 192.168.0.20, Version: TLSv1.2, Cipher: ECDHE-RSA-AES256-GCM-SHA384, Bits: 256"
"IMAPD" 9080 160 "2026-06-17 15:11:46.293" "192.168.0.20" "RECEIVED: A0003 CAPABILITY"
"IMAPD" 9080 160 "2026-06-17 15:11:46.293" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0003 OK CAPABILITY completed"
"IMAPD" 7644 160 "2026-06-17 15:11:46.293" "192.168.0.20" "RECEIVED: A0004 CAPABILITY"
"IMAPD" 7644 160 "2026-06-17 15:11:46.293" "192.168.0.20" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL STARTTLS NAMESPACE RIGHTS=texk[nl]A0004 OK CAPABILITY completed"
"IMAPD" 4572 160 "2026-06-17 15:11:46.293" "192.168.0.20" "RECEIVED: A0005 LOGIN "[email protected]" ***"
"IMAPD" 4572 160 "2026-06-17 15:11:46.308" "192.168.0.20" "SENT: A0005 OK LOGIN completed"
"IMAPD" 9080 160 "2026-06-17 15:11:46.308" "192.168.0.20" "RECEIVED: A0006 NAMESPACE"
"IMAPD" 9080 160 "2026-06-17 15:11:46.308" "192.168.0.20" "SENT: * NAMESPACE (("" ".")) NIL (("#Public" "."))[nl]A0006 OK namespace command complete"
"IMAPD" 7644 160 "2026-06-17 15:11:46.323" "192.168.0.20" "RECEIVED: A0007 LOGOUT"
"IMAPD" 7644 160 "2026-06-17 15:11:46.323" "192.168.0.20" "SENT: * BYE Have a nice day[nl]A0007 OK Logout completed"

Any ideas???

Edit: Ahh. Here's the clue I needed. This is from the Roundcube error log, which is where I should have started. d'oh:

[17-Jun-2026 14:38:11 +0000]: <287gkoap> PHP Error: Access denied for new user [email protected]. 'auto_create_user' is disabled in /var/www/html/webmail/program/include/rcmail.php on line 824 (POST /?_task=login&_action=login)
Found the key in config.inc.php and changed it from false to true:

// 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;

...and we're back in action. No idea when this got changed!

Thanks
Ken.