Symptoms
Note: The article is applicable only to the operating systems with SELinux available by default – CentOS and Red Hat Enterprise Linux.
-
Mail does not work with the following records in the file
/var/log/maillog
:plesk postfix/sendmail[22630]: warning: command "/usr/sbin/postdrop -r" exited with status 126
plesk postfix/sendmail[22630]: fatal: [email protected](30): unable to execute /usr/sbin/postdrop -r: Success
plesk plesk sendmail[22629]: sendmail unsuccessfully finished with exitcode 75
plesk postfix-local[22617]: Unable to forward original message. sendmail status: 75
plesk postfix-local[22617]: Unable to send mail for: [email protected] -
SELinux is in enforcing mode:
# getenforce
Enforcing -
The following record can be found in the file
/var/log/messages
:plesk kernel: type=1400 audit(1525759517.531:137830): avc: denied { getattr }
Cause
Incorrect SELinux context on the file /usr/lib64/plesk-9.0/sendmail/postdrop
.
Resolution
-
Connect to the server using SSH.
-
Set correct context:
# chcon system_u:object_r:postfix_postdrop_exec_t:s0 /usr/lib64/plesk-9.0/sendmail/postdrop
To set the correct context permanently:
# yum install policycoreutils-python
# semanage fcontext -a -t postfix_postdrop_exec_t /usr/lib64/plesk-9.0/sendmail/postdrop
# restorecon -Rvv /usr/lib64/plesk-9.0/sendmail/postdrop