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[2450]: NOQUEUE: SYSERR(apache): /etc/mail/ 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 

No comments

Leave your comment

In reply to Some User
Captcha Image