Roundcube authorization fails for migrated accounts. Login failed error appears

Created:

2016-11-16 13:26:11 UTC

Modified:

2017-08-16 18:29:33 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Roundcube authorization fails for migrated accounts. Login failed error appears

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Mail users were migrated from another server. On attempt to login to Roundcube the error message is shown:

Login failed

Or a blank page is shown.

The following output is found in Roundcube error log in /var/log/plesk-roundcube/errors file:

IMAP Error: Login failed for billing from 10.10.0.10. AUTHENTICATE CRAM-MD5: A0001 NO Login failed. in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (POST /?_task=login&_action=login)

IMAP Error: Login failed for <mail_account> from 10.10.0.10(X-Real-IP: 10.10.0.10,X-Forwarded-For: 10.10.0.10). Authentication failed. in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (POST /roundcube/?_task=login?_task=login&_action=login)

Cause

Passwords of migrated mail accounts are stored in the database as hash:

# sqlite3 /var/spool/postfix/plesk/passwd.db
sqlite> select * from users;
1|1|lom|$1$Hflr2KeV$WtHnknCATMNKM13ATDM/P1||0

Resolution

Change authorization method to PLAIN in Roundcube configuration file so that it looks like:

# grep 'auth_type' /usr/share/psa-roundcube/config/defaults.inc.php
$config['imap_auth_type'] = PLAIN;
$config['smtp_auth_type'] = 'PLAIN';

Also mass password reset can be used to change the passwords (6 characters long password):

# /usr/local/psa/admin/bin/mail_auth_view | grep -v ^+ | sed '1,2d' | sed -n -e :a -e '1,4!{P;N;D;};N;ba' | awk -F "|" '{print $2}' > /tmp/mailboxlist
# while read i; do /usr/local/psa/bin/mail -u $i -passwd `openssl rand -base64 6`; done < /tmp/mailboxlist
Have more questions? Submit a request
Please sign in to leave a comment.