Mchk utility fails with error: Errors occured in mail restore procedure

Created:

2016-11-16 13:17:15 UTC

Modified:

2017-08-16 16:41:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Mchk utility fails with error: Errors occured in mail restore procedure

Applicable to:

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

Symptoms

The Mchk utility fails with this error:

    Checking for: mail_drweb_restore... ok
Errors occured in mail restore procedure
Some utilities have exited with errors:
/usr/lib64/plesk-9.0/mail_auth_dump

Cause

The 'mail_auth_dump' utility crashes if there is a problem with one or several mailbox passwords.

Resolution

There are several cases when 'mail_auth_dump' may fail to rebuild its mail authentication database. Please follow these steps to find the root cause of your issue:

  1. Check whether there are any mail accounts without a password set up. Log in to the PSA database and execute:

    mysql> SELECT CONCAT_WS('@',mail.mail_name,domains.name),accounts.password FROM domains,mail,accounts WHERE domains.id=mail.dom_id AND accounts.id=mail.account_id AND accounts.password='' ORDER BY domains.name ASC,mail.mail_name ASC;
  2. Check whether there are accounts with the passwords that cannot be decrypted by Plesk:

    /usr/local/psa/admin/sbin/mail_auth_view | grep '$AES'
  3. Check for mailboxes with an incorrect encryption method defined in the Plesk database:

     MYSQL_PWD=`cat /etc/psa/.psa.shadow`  mysql -uadmin psa -Ne "SELECT CONCAT_WS('@',mail.mail_name,domains.name),accounts.password FROM domains,mail,accounts WHERE domains.id=mail.dom_id AND accounts.id=mail.account_id AND accounts.type='sym' and accounts.password  not like '%AES%' ORDER BY domains.name ASC,mail.mail_name ASC"
  4. Check that every mail account in the mail table has corresponding entry in the accounts table:

    mysql> select * from mail where account_id not in (select id from accounts);

    If the result is not empty, please apply the solution described in this article .

If any of the above queries return a non-empty result, the password for the corresponding mailboxes should be changed in order to re-encrypt it in the Plesk database.

If the previous methods do not help to resolve the issue, and '/usr/local/psa/admin/sbin/mail_auth_view' returns the full list of mailboxes and passwords, then Plesk may be failing due to combinations of special characters in a mailbox's password.

If none of these methods help, you can also try to strace the 'mail_auth_dump' utility:

strace -q -vtT -s4096 -ostrace.log  /usr/lib64/plesk-9.0/mail_auth_dump

The output file 'strace.log' should contain some hints on the cause of this failure.

Have more questions? Submit a request
Please sign in to leave a comment.