PLESK: mail_auth_dump... fail running mchk --with-spam

Created:

2016-11-16 12:44:00 UTC

Modified:

2017-08-16 17:01:54 UTC

1

Was this article helpful?


Have more questions?

Submit a request

PLESK: mail_auth_dump... fail running mchk --with-spam

Applicable to:

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

Symptoms

Execution of /usr/local/psa/admin/sbin/mchk utility results in error message:

Errors occurred in mail restore procedure
Some utilities have exited with errors.

or

Similar messages can be found in /var/log/maillog :

No such user 'mailuser@domain.tld' in mail authorization database

Cause

Empty passwords for mail accounts

Resolution

  1. Execute the below command to get the list of such email accounts :

    ~# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa "SELECT m.mail_name, d.name FROM mail m LEFT JOIN accounts a ON a.id = m.account_id LEFT JOIN domains d ON m.dom_id = d.id WHERE trim(a.password) = ''"

    You will get the list of accounts for which you need to change the passwords.

  2. Use the following command to change the passwords for all mail accounts with empty passwords:

    ~# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -Nse"SELECT CONCAT_WS('@',mail.mail_name,domains.name) 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" | awk '{print "--update",$1,"-passwd P@S$w0rd"}' | xargs -I -t -n4 /usr/local/psa/bin/mail
Have more questions? Submit a request
Please sign in to leave a comment.