Apache on CentOS 7 can't send emails via Sendmail. Website front-end displays following error:
Could not execute: /usr/sbin/sendmail
/var/log/maillog file shows following error:
sendmail: NOQUEUE: SYSERR(apache): /etc/mail/sendmail.cf: line 0: cannot open: Permission denied
Quick 'sestatus' check revealed that the issue was caused by SELinux.
Running: getsebool httpd_can_sendmail returns off, which means that Apache (httpd) doesn't have permission to send emails.
The issue was resolved by running: setsebool -P httpd_can_sendmail on
CentOS 7 LAMP server
Leave your comment