Applicable to:
- Plesk for Linux
Symptoms
-
When repairing mail with
plesk repair mail
, the operation fails with:# 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:CONFIG_TEXT: Sep 3 06:59:30 mail plesk_saslauthd[25101]: failed mail authenticatication attempt for user 'example' (password len=9)
Sep 3 06:59:30 mail postfix/smtpd[25099]: warning: unknown[xxx.xxx.xxx.xxx]: SASL LOGIN authentication failed: authentication failure
Cause
Incorrect location of /usr/bin/which
.
Resolution
-
Connect to the server via SSH
-
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 Sep 4 04:15 /usr/bin/which -> /bin/which -
If the issue persists, reinstall
which
package:# rpm -e --nodeps --noscripts which
# yum install which -y -
Run
plesk repair mail
again.
Comments
5 comments
Following these instructions destroyed the `which` command completely.
Any instructions on how to fix a missing /bin/which?
@Martijn
Hello!
The steps from the resolution recreate the link to /bin/which and there are not steps which may delete /bin/which.
As a solution for your case, I can suggest installing "which". As an example, for CentOS the command will be:
# yum install which
Hello,
i get an error when I run the plesk repair mail command:
ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/mchk'] with exit code [1
Checking for: mail_dk_restore ... fail
Errors occured in mail restore procedure
Some utilities have exited with errors:
/usr/lib/plesk-9.0/mail_dk_restore
But I can not find anything in the log files and can not find any instructions in the forum.
@De-velopment
To get additional details about this error, it is required to check /var/log/plesk/panel.log. This error is indeed a new one, it was not reported previously, so it may be required to investigate it on a Plesk side. Consider submitting a support request to Plesk directly or to a reseller, depending on where the license was purchased.
Hi,
On our server, I got:
root@example:/home/ubuntu# vi /usr/bin/which
root@example:/home/ubuntu# unlink /usr/bin/which
root@example:/home/ubuntu# ln -s /bin/which /usr/bin/which
root@example:/home/ubuntu# ls -al /usr/bin/which
lrwxrwxrwx 1 root root 10 אפר 29 12:24 /usr/bin/which -> /bin/which
root@example:/home/ubuntu# plesk repair mail -y
Repairing the mail server configuration
Reconfiguring all domains and mailboxes ......................... [2022-04-29 12:25:17.469] 2611498:626baefa44ce6 ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/mchk'] with exit code [1]
[FAILED]
- mchk failed: ==> Checking for: mailsrv_conf_init... fail
Error messages: 0; Warnings: 0; Errors resolved: 0
exit status 1
root@example:/home/ubuntu# rpm -e --nodeps --noscripts which
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
error: package which is not installed
root@example:/home/ubuntu# yum install which -y
Command 'yum' not found, did you mean:
command 'gum' from snap gum (0.12.0)
command 'num' from deb quickcal (2.4-1)
command 'sum' from deb coreutils (8.30-3ubuntu2)
command 'zum' from deb perforate (1.2-5.1)
command 'uum' from deb freewnn-jserver (1.1.1~a021+cvs20130302-7build1)
See 'snap info <snapname>' for additional versions.
*************************************************
Seems like installing 'which' fails.
Can you suggest a solution?
Please sign in to leave a comment.