Fix sendmail permission problem

I was getting this error:

SYSERR(apache): collect: Cannot write ./dfv26KMJIi025453 (bfcommit, uid=48, gid=51): Permission denied
SYSERR(apache): queueup: cannot create queue file ./qfv26KMJIi025453, euid=48, fd=-1, fp=0x0: Permission denied

The problem was that SELinux was preventing Apache (httpd) from writing files files in system mail folders. Use getsebool to confirm:

$ getsebool -a | grep mail
httpd_can_sendmail --> off

To fix the problem:

$ setsebool -P httpd_can_sendmail on

Check it worked:

$ getsebool -a | grep mail
httpd_can_sendmail --> on