Author Topic: One User cannot login (Login failed) others however can without problems.  (Read 8983 times)

Offline ralfm

  • Newbie
  • *
  • Posts: 3
Hi all!

Weird problem here. I have 0.5.3 stable installed on Ubuntu (2.6.35-22-generic-pae) with UW IMAP 2007e.404 (accessed via ssl).

Server caps are: "OK [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ SASL-IR LOGIN-REFERRALS AUTH=PLAIN AUTH=LOGIN]"

Everything works fine so far, with the exception that *one* specific user cannot login in roundcube, getting the error

  "Login failed for XXX from XXXXXXXX. AUTHENTICATE PLAIN: Missing or invalid argument to AUTHENTICATE"

right after typing his password at the login page. He can, however, login from SquirrelMail, Thunderbird, mutt, etc. without any issues. None of the other roundcube users on the same system have any issues loging in, so this seems to be something user-specific.

I've spent the whole day on googling and fiddling with the system and even completly reinstalled roundcube without success. I'm out of ideas how to further track this down not to mention to solve this weird issue.

Any help will be highly appreciated.

Ralf

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Enable imap_debug and show the log. Are you using any special characters (including space) in login or password?

Offline ralfm

  • Newbie
  • *
  • Posts: 3
Quote
Enable imap_debug and show the log. Are you using any special characters (including space) in login or password?


Username and password are ASCII only, no spaces or special chars. Just lowercase chars and numbers.

logs/imap:
Code: [Select]

[17-Jul-2011 21:21:37 +0200]: S: * OK [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ SASL-IR LOGIN-REFERRALS AUTH=PLAIN AUTH=LOGIN] localhost IMAP4rev1 2007e.404 at Sun, 17 Jul 2011 21:21:36 +0200 (CEST)
[17-Jul-2011 21:21:37 +0200]: C: A0001 AUTHENTICATE PLAIN cnMAcnMAcjBsNG5k
[17-Jul-2011 21:21:37 +0200]: S: A0001 BAD Missing or invalid argument to AUTHENTICATE
[17-Jul-2011 21:21:37 +0200]: C: A0002 LOGOUT
[17-Jul-2011 21:21:37 +0200]: S: * BYE ubuntu IMAP4rev1 server terminating connection
[17-Jul-2011 21:21:37 +0200]: S: A0002 OK LOGOUT completed


HTH,
Ralf

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Are you using proxy auth? What do you have in imap_auth_cid and imap_auth_pw options? Try setting imap_auth_type='login'.

Offline ralfm

  • Newbie
  • *
  • Posts: 3
Partly solved plus an additional issue - please read on...

First, for the records:

Quote
Are you using proxy auth?


No.

Quote
What do you have in imap_auth_cid and imap_auth_pw options?


Code: [Select]

// Optional IMAP authentication identifier to be used as authorization proxy
$rcmail_config['imap_auth_cid'] = null;

// Optional IMAP authentication password to be used for imap_auth_cid
$rcmail_config['imap_auth_pw'] = null;


Quote
Try setting imap_auth_type='login'.


I already did this and ran into the error

Code: [Select]

Fatal error: Maximum execution time of 120 seconds exceeded in /data/www/htdocs/mail/program/include/rcube_imap_generic.php on line 3189


when loging in as said user. Other users, again, had no problems.

Checking "logs/imap", however, I saw that the user had successfully loged in!

So, setting this to the value 'login' fixes the login issue, but I still have no clue why it worked for the other users when it was set to "null;" before. If someone can enlighten me...

Now for the timeout issue: In the "imap" logfile i saw some strange looking mbox names in the list, that where also present in the ".mailboxlist" file in the users home directory. I don't know whether the UW IMAP server creates this file or one of the IMAP clients. But after renaming this file to something else, I was able to login without timeout error, just with the INBOX in the folder list. When I tried to "manage folders" in this state, roundcube just hangs until I select any other function or the inbox again.

I restored ".mailboxlist" and removed the odd looking entries from it. Namely this was a mbox file called "Gel&APY-schte Elemente" (the localized German version of "Deleted Items", which is automatically created by Microsoft Outlook) and a bunch of mboxes with names enclosed in square brackets (e.g. "[status]", "[newsletter]" and so on).

After removing them and re-login everything seems to be fine right now.

To sumarize:

- the acute login problem has been solved, but I still don't understand what the issue is
- the problem with ".mailboxlist" seems to be a bug of roundcube as other IMAP clients had no problems with the odd names in it.

Ralf

Offline jonabbey

  • Newbie
  • *
  • Posts: 4
One User cannot login (Login failed) others however can without problems.
« Reply #5 on: August 08, 2011, 03:56:19 PM »
We're also using UW IMAPd, and were seeing login failures with "AUTHENTICATE PLAIN: Missing or invalid argument to AUTHENTICATE" for about 1/5rd of our users who tried logging in.

This was repeatable for those users, but other users were able to login without problems.

Setting imap_auth_type='login' worked for us.

I was tearing my hair out, thanks for the solution.

 Jon

Offline titus

  • Newbie
  • *
  • Posts: 1
Re: One User cannot login (Login failed) others however can without problems.
« Reply #6 on: September 11, 2012, 06:48:50 PM »
Just updated from 0.3.1 to 0.8.1 and also experienced this strange problem in combination with UW imap.  Some users could login, others couldn't even though imapd process logged successful logins for all users (in /var/log/mail.log)

setting imap_auth_type from NULL to LOGIN fixed the problem
$rcmail_config['imap_auth_type'] = LOGIN;

Interestingly the problem only occurred for users with eight character passwords, changing the passwords for problem users to passwords with nine or more characters fixed the problem even with
$rcmail_config['imap_auth_type'] = NULL;