It is not possible to manage mail account settings while logged in as mail user, the Mail tab does not exist

Created:

2016-11-16 13:24:11 UTC

Modified:

2017-04-24 11:36:51 UTC

0

Was this article helpful?


Have more questions?

Submit a request

It is not possible to manage mail account settings while logged in as mail user, the Mail tab does not exist

Applicable to:

  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux

Symptoms

It is not possible to manage mail account settings while logged in as mail user, the Mail tab does not exist.

Mail user CP

Appropriate me @example.com account has userId = 0 dispite the fact that Access to the Customer Panel is enabled for this user.

mysql> select mail_name,userId from mail where mail_name='me';

+-----------+--------+
| mail_name | userId |
+-----------+--------+
| me | 0 |
+-----------+--------+
1 row in set (0.00 sec)

Cause

Database inconsistency.

Resolution

  1. Create psa database backup:

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` psa > /tmp/psadump.`date +%F_%H.%M`.sql
  2. Find affected accounts using the following query:

    # mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -sNe"select m.id mail_id, smu.id smb_id, smu.login from domains as d join mail as m on d.id=m.dom_id join smb_users smu on smu.login=CONCAT(m.mail_name, '@', d.name) where m.userId=0"
  3. To assign a corresponding user to a mail account do the the following database update:

    # mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -sNe"update mail as m join domains as d on d.id=m.dom_id join smb_users smu on smu.login=CONCAT(m.mail_name, '@', d.name) set m.userId=smu.id where m.userId=0"

Another solution :

Execute following command:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -N -e"select login,email from smb_users;"| while read login email; do echo $login, $email; /usr/local/psa/bin/user --update $login -email $email;done
Have more questions? Submit a request
Please sign in to leave a comment.