Bobcares

mchk plesk – How do we perform mchk plesk?

by | Feb 11, 2021

Figuring how to do “mchk” Utility in Plesk? We can help you.

This utility rebuilds all mail configuration files. In addition, it restores the settings for all mailboxes created in Parallels Plesk Panel.

As part of our Server Management Services, we assist our customers with several Plesk queries.

Today, let’s see how our Support Engineers easily fix this error for our customers.

 

Why is mchk utility?

Mchk plesk utility sets proper ownership and permissions for all mailboxes. And, It rebuilds mail server control files’ mailboxes settings.

In addition, it sets appropriate permissions for all the related files. In short, it will rebuild the mail configuration or recreate the broken mail handlers.

 

How do we do mchk plesk?

Recently, one of our customers approached us with the request to provide him the steps to perform mchk utility in both Windows and Linux.

Since it will cause some downtime, our Support Techs recommend running it only during off-peak hours.

The steps we follow both in Linux and Windows are given below:

We usually follow the steps below:

  • Parallels Plesk Panel for Windows

C:\Users\Administrator>cd %plesk_bin%

C:\Parallels\Plesk\admin\bin>mchk.exe –all –fix=all
  • Parallels Plesk Panel for Linux

  1. Firstly, we stop the mail service
    /usr/local/psa/admin/sbin/mailmng –stop-service
  2. Next, backup old handlers:
    mkdir /root/temp
    cp -a /usr/local/psa/handlers/before-* /root/temp/
    cp -a /usr/local/psa/handlers/info /root/temp/
  3. Then, we delete all the mail handlers:
    rm -rf /usr/local/psa/handlers/before-*/*
    rm -rf /usr/local/psa/handlers/info/*
  4. After that, we run mchk utility to recreate mail handlers:
    /usr/local/psa/admin/sbin/mchk –with-spam
  5. Finally, we start the mail service:
    /usr/local/psa/admin/sbin/mailmng –start-service

By performing these steps we helped our customer with his query regarding mchk.

Our Engineers are always here for finding solutions for our customer’s problems.

 

Few Common Errors of mchk plesk

Moving ahead, let us focus on a few errors and its fix in detail.

a) Plesk repair mail or mchk fails: mail_outgoing_restore… fail

The symptoms of this error include:

  • Plesk repair mail or /usr/local/psa/admin/sbin/mchk command fails:
==> Checking for: mail_outgoing_restore... fail
Some utilities have exited with errors:
/usr/lib64/plesk-9.0/remote_mail_restore/mail_outgoing_restore
  • The following files present on the server:
# ls -al /usr/lib/plesk-9.0/mail_postfix_transport_restore
-rwxr-x--- 1 root root 348 Mar 1 2018 /usr/lib/plesk-9.0/mail_postfix_transport_restore

# ls -al /usr/lib/plesk-9.0/remote_mail_restore/mail_outgoing_restore
-rwxr-x--- 1 root root 358 Mar 1 2018 /usr/lib/plesk-9.0/remote_mail_restore/mail_outgoing_restore

The major cause of this error is a failed upgrade.

In order to solve this, our Support Techs follow the below steps:

  1. Log in to the server over SSH
  2. Move the files to the other location:
    # mv /usr/lib/plesk-9.0/remote_mail_restore/mail_postfix_transport_restore /root/plesksupport/
    # mv /usr/lib/plesk-9.0/remote_mail_restore/mail_outgoing_restore /root/plesksupport/
  3. Reinstall latest updates:
    # plesk installer update --repatch

b) mchk failed: mailsrv_conf_init… not found

  • Execution of plesk repair mail fails:
# plesk repair mail
Reconfiguring all domains and mailboxes ......................... [2017-09-03 11:17:31] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/mchk'] with exit code [1]
[FAILED]
- mchk failed: ==> Checking for: mailsrv_conf_init... not found,
skipped
  • Symbolic link /usr/bin/which points not to /bin/which
# ls -al /usr/bin/which
lrwxrwxrwx 1 root root 63 Aug 24 04:04 /usr/bin/which -> ../local/share/.config/yarn/global/node_modules/which/bin/which
  • Mail authorization database is empty:
# /usr/local/psa/admin/bin/mail_auth_dump
Authentication database contents:
+--------------------------------------+
| address |flags| password |
+--------------------------------------+
+--------------------------------------+
  • In /var/log/maillog there are records like:
Feb 3 06:59:30 mail plesk_saslauthd[25101]: failed mail authenticatication attempt for user 'example' (password len=9)
Feb 3 06:59:30 mail postfix/smtpd[25099]: warning: unknown[xxx.xxx.xxx.xxx]: SASL LOGIN authentication failed: authentication failure

Incorrect location of /usr/bin/which is the cause of this error.

In order to resolve this our Support Techs suggest the following steps:

  1. Connect to the server via SSH
  2. Change location of /usr/bin/which
    # unlink /usr/bin/which
    # ln -s /bin/which /usr/bin/which
    # ls -al /usr/bin/which
    lrwxrwxrwx 1 root root 10 Feb 4 04:15 /usr/bin/which -> /bin/which
  3. If the issue persists, reinstall which package:
    # rpm -e --nodeps --noscripts which
    # yum install which -y
  4. Run plesk repair mail again.

[Need further assistance with mchk utility? – We’ll help you]

 

Conclusion

In short, we discussed in detail on mchk utility in Plesk and saw how our Support Engineers help the customers with this.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF