note 92993 deleted from function.mail by cmb
| From: | cmb@php.net | Date: | Sun, 21 Jul 2019 08:30:38 +0000 |
| Subject: | note 92993 deleted from function.mail by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211641@lists.php.net to get a copy of this message | ||
Note Submitter: Clayton Ginsburg
----
I recently had an issue where the mail() function would work fine from the php cli but not from
apache.
I eventually traced this down to the fact that I was using apparmor
Specifically, I configured apparmor to deny the apache user the ability to use /bin/dash
After changing apparmor to /bin/dash rix
and reloading the apparmor profile, mail worked
In other words, mail requires the account/program executing the script to be able to use /bin/dash
I hope this helps someone