Author Topic: Roundcube login failed out of the blue (but worked before) thunderbird works!  (Read 3562 times)

Offline femco

  • Jr. Member
  • **
  • Posts: 11
Hi,
i am using an ubuntu server (12.04), i have installed a postfix mail-server on top of it using this tutorial: http://flurdy.com/docs/postfix/
but thats just to give you the basics.
I did this a few months ago and had no problems since then, this includes roundcube.
But i just noticed that i cannot login to my mail account using roundcube anymore. I just get the message: "Login failed" (i use the germal localisation so basicaly the message is "Die Anmeldung ist Fehlgeschlagen").

But this is just a roundcube problem, because i can send and get new mails with thunderbird without problems!
The weird thing is, that i definetly did not changed anything on the server.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,541
    • http://SKaero.com/
Whats in the RoundCube error log?

Offline femco

  • Jr. Member
  • **
  • Posts: 11
This is the error:
Code: [Select]
user@mydomain12345.de from x.x.x.x.
AUTHENTICATE CRAM-MD5: A0001 NO
Login failed. in /var/www/roundcube/program/lib/Roundcub /rcube_imap.php
on line 184 (POST /roundcube/?_task=login&_action=login)

I think i know what the problem is, but i do not know how to solve it:
Apart from Roundcube, my mail server is configured in a way such that new accounts get their password sHA-256 encrypted (crypt prefix in the database $5$) my roundcube password plugin is configured to use MD5, so when a user changes its password the new password has the prefix $1$....
.. if i think about it... it is true what i have said, but this should not have any effect. It is so that there is no problem with thunderbird and the roundcube login worked too even after changing the password. And in any way the encryption/decryption functions should notice the prefix too.

One thing related to the error message: the affected accounts have MD5 encrpyted passwords (entry prefix in the database field is $1$)


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,541
    • http://SKaero.com/
Does your mail server support CRAM-MD5?

Offline femco

  • Jr. Member
  • **
  • Posts: 11
I think so because thunderbird works with the md5 encrpyted accounts and it worked before with the SHA256 accounts, even roundcube had no problems at least until a few weeks ago as i last checked, i do not know how long the problem is there, because i normaly only use thunderbird.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,541
    • http://SKaero.com/
The method the imap server uses to authenticate isn't the same thing as how the password are stored. Try changing the imap_auth_type in the RoundCube main.inc.php file to see if any of the other methods work.

Offline femco

  • Jr. Member
  • **
  • Posts: 11
Thanks that solved my problem, here is what i did:

imap_auth_type was: null

i tried CRAM-MD5 -> did not work
then LOGIN -> did work

I do not understand whats going on, i am pretty sure that i did not changed that value and iam sure that roundcube worked before.
Maybe i upgraded ubuntu recently (apt-get upgrade) and one of the mail server tools (maybe courier) got updated and some settings got overwritten.
But i just checked and courier still has MD5 support activated.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,541
    • http://SKaero.com/
When imap_auth_type is null it tires to automatically pick an authenticate method, since it picked CRAM-MD5 your IMAP server is most likely advertising CRAM-MD5 support (you can check by enabling imap_debug in the main.inc.php) but its not working for one reason or another.