Roundcube Community Forum

 

Brand new setup - logins failing

Started by pschmehl, June 14, 2024, 05:14:05 PM

Previous topic - Next topic

pschmehl

I"m trying to setup RC (1.6.7) on a domain that I manage. I followed the install instructions, which seemed to work fine. Now that I'm setup, logins are failing. I'm using Postfix, Dovecot, and Spamassassin on the server. I have imap and pop listening on localhost only and imaps listening in 993. Postfix is listening on 587.

From my Mac laptop in my home, using Mac mail, I can login to the imap server, read and respond to emails, and delete emails. So, both SMTP and IMAPS are working fine.

From the roundcube interface, when i attempt to login using a known good username and password, I get a login failure.

[14-Jun-2024 15:16:29 -0500]: <jark9gp6> IMAP Error: Login failed for geek@stovebolt.com against localhost from 108.234.20.166. AUTHENTICATE PLAIN: Authentication failed. in /var/www/html/webmail/program/lib/Roundcube/rcube_imap.php on line 211 (POST /webmail/?_task=login&_action=login)

What are my options for debugging this?

I added the folowing to config.inc.php
// system error reporting, sum of: 1 = log; 4 = show
$config['debug_level'] = 4;

// Log SQL queries
$config['sql_debug'] = true;

// Log IMAP conversation
$config['imap_debug'] = true;

// Log LDAP conversation
#$config['ldap_debug'] = true;

// Log SMTP conversation
$config['smtp_debug'] = true;

Yet the error messages are unchanged.

UPDATE: I enabled auth_debug logging in dovecot. I'm seeing this in the logs:
Jun 14 21:52:23 ded602 dovecot: imap-login: Login: user=<geek>, method=PLAIN, rip=54.163.217.2, lip=108.174.193.29, mpid=9055, TLS, session=<XM23++Ma9+82o9kC>


This is my Mac mail client logging in to imap.

Jun 14 21:55:41 ded602 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 3 secs): user=<geek@stovebolt.com>, method=PLAIN, rip=::1, lip=::1, secured, session=<d+FSB+Qa2KoAAAAAAAAAAAAAAAAAAAAB>
Jun 14 21:57:20 ded602 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 4 secs): user=<geek@stovebolt.com>, method=PLAIN, rip=::1, lip=::1, secured, session=<BVUzDeQa3qoAAAAAAAAAAAAAAAAAAAAB>


This is me trying to login from roundcube.

# telnet localhost imap
Trying ::1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
operl LOGIN geek <passwd>
operl OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY SPECIAL-USE] Logged in
* BYE Internal error occurred. Refer to server log for more information.
Connection closed by foreign host

And this is me telnetting to the imap port on the localhost. (The password has been removed.)

When it says "refer to the server log, I'm assuming that would be where dovecot logs, which is /var/log/maillog.

It has me wondering what that internal error is and how I could see it.

JohnDoh

The various log entries you posted use different usernames. `geek` vs `geek@stovebolt.com`. What is the correct username? I see you have enabled imap_debug in Roundcube, can you match that log with your dovecot log?
QuoteWhen it says "refer to the server log, I'm assuming that would be where dovecot logs, which is /var/log/maillog.
Yes thats referring to dovecot logs, the location of those depends on your setup. Probably better to ask about that in the dovecot community.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

pschmehl

#2
The username is geek. The email address is geek@stovebolt.com.

I'm really confused. I can successfully login using either telnet or ssl or my mail client on my laptop. All three methods are successful. Yet every attempt to login from roundcube generates the same error message and the login fails.

You triggered a thought though.
[15-Jun-2024 01:14:12 -0500]: <jark9gp6> IMAP Error: Login failed for geek@stovebolt.com against localhost from 108.234.20.166. AUTHENTICATE PLAIN: Authentication failed. in /var/www/html/webmail/program/lib/Roundcube/rcube_imap.php on line 211 (POST /webmail/?_task=login&_action=login)
[15-Jun-2024 01:21:38 -0500]: <jark9gp6> PHP Error: Access denied for new user geek. 'auto_create_user' is disabled in /var/www/html/webmail/program/include/rcmail.php on line 824 (POST /webmail/?_task=login&_action=login)

Notice how logins are failing for geek@stovebolt.com? That's because the login is geek, not geek@stovebolt.com. I commented out the config attribute #$config['username_domain'] = 'stovebolt.com'; and that generated the error on the second line.

So, how do I get roundcube to submit only the username to the imap server?

pschmehl

OK. I figured it out. Roundcube was appending the domain to the login because I had it configured that way. Once I changed domain name to '', I got the error message about autocreating a user account. I misunderstood what that meant. After rereading the config file, I realized Roundcube wanted to create the user in its own database, which is fine. So, I set that to true, and I was abel to successfully login.

Thanks for your help. Your question about which login was correct triggered my thoughts that arrived at the resolution.