Local mail delivery does not work: Unable to open database(readonly) /var/lib/plesk/mail/handlers/handlers.db

Created:

2016-11-16 12:40:41 UTC

Modified:

2017-08-08 13:15:21 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Local mail delivery does not work: Unable to open database(readonly) /var/lib/plesk/mail/handlers/handlers.db

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Email is sent successfully, however it is not delivered to local mailbox.The following error is logged into /var/log/maillog :

Aug  8 11:56:23 hostname journal: plesk sendmail[356]: Unable to open database(readonly) /var/lib/plesk/mail/handlers/handlers.db: unable to open database file
Aug 8 11:56:23 hostname journal: plesk sendmail[356]: Unable to get full handlers list
Aug 8 11:56:23 hostname journal: plesk sendmail[355]: Worker process failed to execute handlers: unexpected exit code: 255

Selinux is enabled on the server:

# getenforce
Enforcing

The following error is found in /var/log/audit/audit.log :

pe=AVC msg=audit(1470655723.130:16867): avc:  denied  { read } for  pid=16411 comm="postfix-local" name="handlers.db" dev="dm-3" ino=5072576 scontext=system_u:system_r:postfix_pipe_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file

Cause

Incorrect Selinux context on /var/lib/plesk/mail/handlers/handlers.db file.

Resolution

Reinstall Plesk selinux rules.

For example, for Plesk 12.5 CentOS 7x64:

# rpm -Uvh --force http://autoinstall.plesk.com/PSA_12.5.30/dist-rpm-CentOS-7-x86_64/opt/selinux/psa-selinux-12.5.30-cos7.build1205150819.14.noarch.rpm
Retrieving http://autoinstall.plesk.com/PSA_12.5.30/dist-rpm-CentOS-7-x86_64/opt/selinux/psa-selinux-12.5.30-cos7.build1205150819.14.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:psa-selinux-12.5.30-cos7.build120################################# [100%]
# getenforce
Enforcing

An appropriate Plesk Selinux package can be found on http://autoinstall.plesk.com .

Have more questions? Submit a request
Please sign in to leave a comment.