• 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

PLESK 10 Mail Handlers - Cannot stat entry - No posted solutions work.

CCHickman

Regular Pleskian
Hello!

I've upgraded to PLESK 10 and love it -- except for 2 things I just cannot resolve on my own.

I have an app vault issue - it stops at 0% on all installations - I posted that to the 3rd party inquiries (and yes, I tried all KB tips and read diligently)...

And now I have a classic problem that the KB solution does not repair.

When SpamAssassin is Enabled via PLESK (Global and either Per Domain oi not Per Domain):
Unable to stat entry '/usr/local/psa/handlers/info/10-spam-yFoBBy/executable' or it is not link: Permission denied

Familiar to many?

http://kb.odin.com/6410

I've reviewed this. I've run mchk --with-spam. I've completely removed all of the handlers as specified in the 'Additional Information' section. I've recreated them all. They look beautiful -- absolutely sparkly. I've even re-run the bootstrapper (that is a Godsend to fixing PLESK's unfortunately rocky installs/upgrades that tend to be par for course -- I had another KB issue there when upgrading and the bootstrapper fixed everything up perfectly -- except these 2 issues!)

Additionally, if I enable SPF or DomainKeys 'Verify Incoming Mail', it's the same story for both of them.

So -- heres some output:

Mar 14 12:59:58 server qmail-local-handlers[26604]: mailbox: /var/qmail/mailnames/antiochwebhost.com/chris
Mar 14 12:59:58 server qmail-local-handlers[26604]: hook_dir = '/usr/local/psa/handlers/before-local'
Mar 14 12:59:58 server qmail-local-handlers[26604]: recipient[3] = '[[email protected]]'
Mar 14 12:59:58 server qmail-local-handlers[26604]: handlers dir = '/usr/local/psa/handlers/before-local/recipient/[[email protected]]'
Mar 14 12:59:58 server qmail-local-handlers[26604]: Unable to stat entry '/usr/local/psa/handlers/info/10-spam-yFoBBy/executable' or it is not link: Permission denied
Mar 14 12:59:58 server qmail-local-handlers[26604]: call_handlers: stop call handlers from dir '/usr/local/psa/handlers/before-local/recipient/[[email protected]]'

----

Permissions:

[root@server mailnames]# cd /usr/local/psa/handlers/
[root@server handlers]# ls -la
total 76
drwxr-xr-x 8 root root 99 Jan 20 07:31 .
drwxr-xr-x 15 root root 4096 Mar 11 04:36 ..
drwxr-xr-x 3 root root 22 Jan 20 07:31 before-local
drwxr-xr-x 2 root root 6 Mar 11 04:50 before-queue
drwxr-xr-x 3 root root 26 Jan 20 07:31 before-remote
drwxr-x--- 2 root root 107 Mar 14 10:38 hooks
drwxr-xr-x 1205 root root 40960 Mar 14 12:50 info
drwxrwx--- 2 root popuser 4096 Mar 14 13:10 spool


[root@server info]# ls -la
total 68
drwxr-xr-x 1205 root root 40960 Mar 14 12:50 .
drwxr-xr-x 8 root root 99 Jan 20 07:31 ..
drwxr-xr-x 2 root root 87 Mar 14 12:50 10-dd51-domainkeys-0edsTr
drwxr-xr-x 2 root root 87 Mar 14 12:50 10-dd51-domainkeys-f8LVNC
drwxr-xr-x 2 root root 87 Mar 14 12:50 10-dd51-domainkeys-PXg60W
drwxr-xr-x 2 root root 83 Mar 14 10:44 10-spam-02d3tq
... etc. etc..
drwxr-xr-x 2 root root 83 Mar 14 10:39 10-spam-yFoBBy
... etc. etc..
[root@server info]#


[root@server info]# ls *10-spam-yF* -l
10-spam-yFoBBy:
total 16
-rw-r--r-- 1 root root 7 Mar 14 10:39 context
lrwxrwxrwx 1 root root 34 Mar 14 10:39 executable -> /usr/local/psa/handlers/hooks/spam
-rw-r--r-- 1 root root 10 Mar 14 10:39 handler-type
-rw-r--r-- 1 root root 13 Mar 14 10:39 hook
-rw-r--r-- 1 root root 25 Mar 14 10:39 recipient


[root@server hooks]# ls -l
total 256
-rwxr-x--- 1 root popuser 32224 Jan 20 07:28 autoresponder
-rwxr-x--- 1 root popuser 28416 Jan 20 07:28 deliver-quota
-rwxr-x--- 1 root popuser 34208 Jan 20 07:28 dk_check
-rwxr-x--- 1 root popuser 34832 Jan 20 07:28 dk_sign
-rwsr-x--- 1 root popuser 57624 Jan 20 07:31 grey
-r-xr-x--- 1 root popuser 33768 Jan 20 07:28 spam
-rwxr-x--- 1 root popuser 25472 Jan 20 07:28 spf

------------------------

I -have- installed qmail-scanner and Spamassassin from the Atomicorp / Atomic Rocket Turtle repository. This -has- provided me with spam protection in the meantime. And YES - I have done all of this WITHOUT this installed on a vanilla PLESK 10. I've also reinstalled the mail drivers rpms and psa-spamassassin and the qmail-rblsmtp RPMS for good measure.

I feel that I completely understand the Knowledge base article and why it SHOULD fix this problem.

I am at a complete loss as to why despite all of this, I the handlers return the same execution errors across the board.

- Chris
 
I have everything on the Spam Settings page unchecked -- just changed settings on a client's domain, which rebuilt their bad handlers, despite having told PLESK to NOT use spamassassin.

_03:38<20rver qmail-local-handlers[27291]: Unable to stat entry '/usr/local/psa/handlers/info/10-spam-Zuhf2o/executable' or it is not link: Permission denied
Mar 24 15:03:38 sMAP coqmail-local-handlers[27291]: call_handlers: stop call handlers from dir '/usr/local/psa/handlers/before-local/recipient/[address]'


seriously? This is silly! What is PLESK doing?
 
As an update - I did the Knowledge Base entry again... I shut down all services, deleted all handlers... then I uninstalled spamassassin... uninstalled all 3rd party (qmail-scanner, spamassassin)... totally made things vanilla...

Reinstalled the /root/parallels/.../maildrivers/ folder ... courier-imap...

And ran mchk...

Mail worked.

Rechecked domain keys and spf in PLESK - and immediately the handlers failed.

Disabled.

I don't know if PLESK does this, but if there's a learning scenario or a desire to observe a system misbehaving very badly, I'd love to get someone from PLESK to take a look. And no, I don't have SUS, I have a 1and1 server.
 
Feel free to lock this one up. I just upgraded to PLESK 10.2 and the problem is now gone. Funny thing - the changelog didn't mention anything that relates --

Regardless, for whatever reason, SPF and DomainKeys are back up and running.

* UPDATE *

I installed psa-spamassassin and that is working fine too.
 
Last edited:
Do you got by any chance in your /temp directory still the plesk update log and forward it or publish it here?

I have the very same issue however i am running already on Plesk 10.2 (Centos 64bit) therefore i might also have to wait a month or more in order to fix my issue.
 
I noticed several issues by testing and i assume that this situation is actually not related to the handlers but merely to the hooks and their permissions.


I) find missing handlers ( http://kb.odin.com/es/6410)

find /usr/local/psa/handlers/before-* -type f | while read h ; do [ ! -d /usr/local/psa/handlers/info/$(basename $h) ] && echo $h ; done


II) mchk --with-spam (deleting of all handlers and reinstall them as according ( http://kb.odin.com/es/6410)

> - no result

after disabling all but really all Mail options except the Dr Web i noticed something unusual in the Maillog

# From the maillog:

07:05:25 mail qmail-queue-handlers[28354]: Unable to stat entry
'/usr/local/psa/handlers/info/20-drweb-Y1IHH3/executable' or it is not link: Permission denied

# However the link does exist:

ls -all /usr/local/psa/handlers/info/20-drweb-Y1IHH3/executable
lrwxrwxrwx 1 root root 35 May 19 17:00 /usr/local/psa/handlers/info/20-drweb-Y1IHH3/executable -> /usr/local/psa/handlers/hooks/drweb

# so does its hook
ls -all /usr/local/psa/handlers/hooks/drweb
-rwsr-x--x 1 drweb popuser 178520 Mar 31 04:05 /usr/local/psa/handlers/hooks/drweb

# Hence the link exist but the permission must be a issue!

I compare with other hook

drwxr-x--- 2 root root 4096 May 18 20:08 .
drwxr-xr-x 8 root root 4096 May 18 16:09 ..
-rwxr-x--- 1 root popuser 33864 Mar 31 04:05 dk_check
-rwxr-x--- 1 root popuser 34520 Mar 31 04:05 dk_sign
-rwsr-x--x 1 drweb popuser 178520 Mar 31 04:05 drweb
-rwsr-x--- 1 root popuser 57240 Mar 31 04:08 grey
-r-xr-x--- 1 root popuser 32552 Mar 31 04:05 spam
-r-xr-x--- 1 root popuser 25480 Mar 31 04:05 spf


What are the the correct Size, Permission or User Settings?
Howto re-install all hooks?
 
M -

I followed the same knowledgebase help ... I've removed all of the handlers and recreated with mchk -- and I still get the same results that you are demonstrating in your maillog.

It's rebuilding things incorrectly, I believe.

Our scenario is EXACTLY the same and it brings me comfort to have someone else on here with the same problem.

I am really hoping that a Parallels team member will desire to investigate this. It's my belief that for everyone who posts a problem, there are at least a dozen people lurking with the same problems.

I just read the PM that you sent me and if you don't mind, I'm sharing it here as it's very good testing / debugging information that will hopefully get the attention of someone at Parallels:

---

I have installed Centos 5 x64bit with PLESK 10.2 base package +QMAIL +PSA-Spamassassin, +Premium Anti virus

Additionally i installed mail related software

1) via Atomic Repo: (check the attached list)

Razor2,
Pyzor
DCC,
Clamav

non mail related:

php 5.2.17
apc
mysql



2) via CPAN or Atomic repo a few perl plug-in that were missing in the SpamAssassin
Razor2::Client::Agent
Mail::SPF::Query
IO::Socket::INET6


3) PCI Compliance adjustments
I made some adjustments of the server due to PCI Compliance requirement however they are minimal since they are in relation only to cipher (TLS or SSL3 protocols)


4) MIGRATION

Then i made a migration from another PLESK 10.2 server with all its domains and customers and started to fine tune the spamassassin with the old settings from our old server.

5) Mail testing resulted in a disaster
I noticed that the very same message received got delivered to our clients multiple times and still appeared in the Mail-Queue . And that emails send directly from the server via php-script vanished on the server itself when SPF was switched on.

I disabled spamassassin, greylisting, SPF, Domainkey verification and Domainkey signing and these email sending from PHP-script worked again and message could be send and received. The maillog however still did show on some occassions that the DRWEB handler got issues with some incoming emails. Only after disabling also Plesk Premium Virus the missing mail disappeared finaly

6) psa-qmail re-installation or upgrading to netqmail-1.06
a) dont try, it does not change anything netqmail 1.06 run into the same problems

b) a complete re-installation of everything that is somehow mail related does just spoil your time. I removed courier-imap, drweb, spamassinn, psa-qmail, psa-qmail-driver, psa-mail-rbl and then made a fresh re-installed of the prior removed software - no result

7) my findings from today are in Plesk and i assume its actually the handler/hook since i deactivated everything expect the Premium-Virus that from time to time still showes problems and states explicit permission issues with the hook.

I was able to identify that the php-email-script that sends email through a php webapplication gets blocked by the SPF hook with the very same error messages encountered by the DRWEB handler/hook.

I must be a developer bug since a SPF handler check from local mail does not make any sense. If i send the email through a email client via the server then the email is not checked through the same SPF handler but when i run it via the php-email script then the SPF gets active.
 
Last edited:
qmail mail handlers and permission denied issues

I have posted this on another thread but do not have the url handy.

I provisioned a new Centos 5.7 x64 server with Plesk 10.4.4 MU#34 and have not been able to get the inbound our outbound mail working.

Tried all the solutions I have come across including mchk, restarts, install Postfix (other problems) then reinstall Qmail, checked permissions on the various qmail and psa mail related directories but still get flooded with the messages below and inbound/outbound does not work:

Jun 5 13:59:32 super qmail-queue-handlers[17629]: Handlers Filter before-queue for qmail started ...
Jun 5 13:59:32 super qmail-queue-handlers[17629]: cannot create temporary file - (13) Permission denied
Jun 5 13:59:32 super qmail-queue-handlers[17629]: cannot read message from stdin
Jun 5 13:59:32 super qmail: 1338919172.264482 warning: trouble injecting bounce message, will try later

I have scoured the web and a lot of people are having problems in Plesk 10 and before with qmail. Several people have solved their problems by applying one of the several solutions mentioned here and others elsewhere but I have tried all I have come across like many others and no go; it appears to be an x64 related problem and perhaps the combination CENTOS 5.7 and other installed software which in my case is just plain vanilla stuff.

HELP!!!!
 
In the case I saw, we had to also give the world read/execute permissions on /usr/local/psa/handlers/. This was found while doing a strace -f -p `/sbin/pidof qmail-lspawn`, observing that the process didn't have rights to create files in /usr/local/psa/handlers/spool.

From the strace:
open("/usr/local/psa/handlers/spool/message9hTGCc", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EACCES (Permission denied)
 
Last edited by a moderator:
Back
Top