Not possible to enable Access to the Customer Panel: The user with the username already exists and has another mailbox.

Created:

2016-11-16 12:52:03 UTC

Modified:

2017-08-08 13:32:09 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Not possible to enable Access to the Customer Panel: The user with the username already exists and has another mailbox.

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  1. The following error appears when trying to enable Access to the Customer Panel at Domains > example.com > Email Addresses > john.doe@example.com

    Error: Unable to create a user for the mailbox. The user with the username john.doe@example.com already exists and has another mailbox.
  2. The correct userId of the mailbox owner:

    mysql> select id as userId, email from smb_users where email="john.doe@example.com";
    +--------+----------------------+
    | userId | email |
    +--------+----------------------+
    | 7 | john.doe@example.com |
    +--------+----------------------+

    However, userId of the affected mailbox is different from the correct one:

    mysql> select userId, mail_name from mail where dom_id in (select id from domains where name="example.com") and mail_name="john.doe";
    +--------+-----------+
    | userId | mail_name |
    +--------+-----------+
    | 0 | john.doe |
    +--------+-----------+

Cause

Database inconsistency.

Resolution

  1. Make a backup of Plesk database and log into it:

    # plesk db dump > psa.sql
    # plesk db
  2. Find the id of the domain with the affected mailbox:

    mysql> select id as dom_id from domains where name='example.com';
    +--------+
    | dom_id |
    +--------+
    | 10 |
    +--------+
  3. Find the correct userId :

    mysql> select id as userId, email from smb_users where email="john.doe@example.com";
    +--------+----------------------+
    | userId | email |
    +--------+----------------------+
    | 7 | john.doe@example.com |
    +--------+----------------------+
  4. Replace userId with the correct value:

    mysql> update mail set userId=7 where mail_name='john.doe' and dom_id=10;
Have more questions? Submit a request
Please sign in to leave a comment.