I have just set a webserver up with NginX and PHP-FPM, etc... However sending mail from the website is not working if selinux is turned on. I've even tried to allow the nginx user to send email with the command: setsebool -P httpd_can_sendmail=on

SELinux is preventing /usr/sbin/postdrop from using the setrlimit access on a process.allow this access for now by executing:# ausearch -c 'postdrop' --raw | audit2allow -M my-postdrop# semodule -i my-postdrop.pp

In order to log all errors , you need to reproduce the problem while SELinux is in permissive mode.Once all issues are being logged - only then sealert can analyse the logs and help you.Try TrevorH's solution first.

Or perhaps read https://laravel.com/docs/5.0/mail and notice that the 'sendmail' driver is the one mentioned last in their options list and is thus the least preferred option. Pick one of the others instead.

CentOS 5 died in March 2017 - migrate NOW!Full time Geek, part time moderator. Use the FAQ Luke

It is going to be a headache but I'll have to find a solution for this later in the future, but not in 2017 anymore. The owner of the webapp doesn't own an SMTP server and wishes to keep using sendmail and honestly. I can't blame him. Normally it works like a charm, the domain records are all set up to recognise the server as trusted by google and other email providers. Plus they don't want to receive any email to that particular email address, it is just there to look better when sending notifications. Like a no-reply@something.com.

So thanks again, I'll keep this open and I'll post any solution that I find in 2018.

If I'm not gonna come back to you guys, then I wish You a Merry Christmas and a Happy New Year!