Hi everyone,
when installing SMF 2.0 on RHEL6 recently, I found that emails were not being sent, with the error
sendmail: fatal: chdir /var/spool/postfix: Permission denied
showing up in /var/log/httpd/error_log. This was caused by the apache user not having SELinux permission to send email. This could also occur on other distributions which use SELinux (particularly Fedora and CentOS, but possibly others as well), if it is set to "Enforcing".
You can check this by using
/usr/sbin/getsebool httpd_can_sendmail
which will report
httpd_can_sendmail --> {on|off}
and if it is off, you can turn it on using
sudo setsebool -P httpd_can_sendmail 1
with the "-P" for persistent (across reboots).
Hope this helps someone!
manyon
Awesome stuff, helped me a lot! Many thanks
Great post, thanks.
Same solution goes for Scientific Linux.
/Frank.
Worked like a charm. Thanks!
I tried to use this to fix the issue I am having with the forum not sending out email. The command reply is setsebool: SELinux is disabled. Is there anything else I can try to get this to work?
If SELinux is disabled, then this doesn't apply to you. Start a new support topic with an explanation on your issue.
Upgraded to CentOS 7, and the same solution works there too.