Symptoms
For some account messages cannot be delivered and the following errors are shown in maillog:
/usr/local/psa/var/log/maillog
--->8---
Jun 10 03:53:42 vps310 postfix-local[21983]: Unable to stat entry '/usr/local/psa/handlers/info/10-spam-0gemCa/executable' or it is not link: No such file or directory
---8<---
Utility mchk does not fix the problem.
Cause
The error is caused by the fact that configuration of mail handler 10-spam-0gemCa is broken.
According to configuration in file system mail account [email protected] has spamfilter enabled:
~# find /usr/local/psa/handlers/ -name '10-spam-0gemCa'
/usr/local/psa/handlers/before-local/recipient/[email protected]/10-spam-0gemCa
~#
During message processing mail service is looking for executable binary, however it is missing:
~# ls -l /usr/local/psa/handlers/info/10-spam-0gemCa/executable
ls: /usr/local/psa/handlers/info/10-spam-3HB5Xe/executable: No such file or directory
~#
Resolution
It is advised to remove all mail handlers and run utility mchk to restore configuration according to Plesk database.
Stop services qmail, postfix, courier-imap and xinetd, backup old handlers and remove them:
~# /etc/init.d/postfix stop
~# /etc/init.d/qmail stop
~# /etc/init.d/courier-imap stop
~# /etc/init.d/xinetd stop
~# mkdir /root/temp
~# cp -a /usr/local/psa/handlers/before-local/recipient /root/temp/
~# cp -a /usr/local/psa/handlers/info /root/temp/
~# rm -rf /usr/local/psa/handlers/before-local/recipient/*
~# rm -rf /usr/local/psa/handlers/info/*
Then run utility mchk to recreate mail handlers. The output may look like the following:
~# /usr/local/psa/admin/sbin/mchk --with-spam
==> Checking for: mail_spam_restore... ok
==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_drweb_restore... ok
==> Checking for: mail_kav_restore... not exsists
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_grey_restore... ok
~#
IMPORTANT: custom mail handlers will be lost after the reconfiguration. They need to be recreated.
Start services qmail, postfix, courier-imap and xinetd after the reconfiguration.
Additional information
The same problem may affect DrWeb Antivirus. You might get the following Antivirus filter report in bounce message:
--- Dr.Web report ---
Dr.Web detailed report:
The filter cannot connect to the DrWEB daemon
--- Dr.Web report ---
This meant that the message could not be delivered because execution of DrWeb mail handler failed.
Additional information
Parallels Plesk Panel 9.x provides ability to configure and put custom mail handlers: PPP 9.2 for Linux/Unix:: Modules API Reference
These handlers do not correspond to records in Plesk database, so mchk does not reconfigure mail handlers automatically.
Currently it is advised to recreate mail handlers according to the instructions above.