• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Suggestion: Improve mchk utility

tkalfaoglu

Silver Pleskian
The mchk utility takes over an hour to run on my system.

Worse, it stops people from fetching or sending mail during its run.

If either of these issues can be improved, it will be a less scary utility.
 
Hi tkalfaoglu,

could you please state as well your server specifications, your operating system, your Plesk version ( incl. MU ) and could you please as well include the amount of domains on your server? The utility "normally" doesn't take this long to check configuration files and settings.

The utility might experience a way longer duration, when passwords are missing. Please see IgorG's comment to solve such issues/problems:

Most probably that it can be related to missed passwords for some mailboxes. In order to get the list of such email accounts, please run the command:

# echo "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) = ''" |mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

Then set passwords for found mailboxes and run

#/usr/lib64/plesk-9.0/mail_restore

#/usr/local/psa/admin/sbin/mchk --without-spam

I hope it will help.
(depending on your system, the location of "mail_restore" can vary. Please locate the file with "locate mail_restore" and use the system specific location in the command with the full path for "mail_restore" )
 
Thank you very much; it's an 8-core monster that I recently got.. You are right; I had dozens of blank passwords..
I just set them all to some gibberish, and hopefully from now on the check utility will behave.
many thanks, -turgut
 
After running and re-running your code and settings passwords to everyone, I had a chance to run mchk again. It was not much faster.
PS: I have 2352 email accounts on about 500 domains on the system.
 
Hi tkalfaoglu,

let's assume, that each mail-account - check will take up 1 second, then in your case, the process will at least have a minimum duration of 2352 seconds = 39,2 minutes. This implements, that the utility doesn't find any misconfiguration / mal-formed setting, which it has to repair. If the utility finds misconfigurations / mal-formed settings, please leave some space for the repair-procedure and add at least another second for these procedures. So in full summary, you might have 2352 seconds + an additional 10 percent repair expectation of 235,2 seconds = minimum 43,12 minutes for an all over expected process duration. If you updated/upgraded your system previously and therefore necessary changes have to be made on your mail-accounts, there is always the possibilty, there some of the mail-accounts have a non-standard configuration, which might increase the scan - ( and repair - ) procedure for that specific mail-accounts. Please leave some space for such issues as well and add another 10 percent in such a cases.
 
Back
Top