EthicalEpi
07-16-2004, 05:43 PM
Hi,
I'm moving over a site to a new server (fedora) and it's running a newer version of php. My Mail out function (in a php script) isn't working because since php version 4.2.3 the fifth parameter of the mail function is disabled in safe mode (I use this fifth parameter to pass the -f option to sendmail to set the envelope sender)
I guess the easy way would be to turn safe mode off or simply drop that fifth parameter but I don't really want to do this if I can help it (or use a pipe to send mail rather than the mail() function).
I'm wary of dropping this fifth parameter because without it mails going out from the site could end up falling foul of spam filters (I'm not sending spam but without the envelope sender set I believe they may be flagged as such).
The simplest/best option seems to be from the PHP manual:
" -f <sender address> - This is why setting the user under which apache is running to be a trusted user allows you to use this option (because sendmail is being invoked by the apache user)."
Can anyone give me any pointers to setting the user under which apache is running to be a trusted user. I'm searching for documentation on this at the moment but haven't been able to find anything yet.
Pulling my hair out a bit at the moment trying to figure it out so any help or advice would be great. Thanks.:)
I'm moving over a site to a new server (fedora) and it's running a newer version of php. My Mail out function (in a php script) isn't working because since php version 4.2.3 the fifth parameter of the mail function is disabled in safe mode (I use this fifth parameter to pass the -f option to sendmail to set the envelope sender)
I guess the easy way would be to turn safe mode off or simply drop that fifth parameter but I don't really want to do this if I can help it (or use a pipe to send mail rather than the mail() function).
I'm wary of dropping this fifth parameter because without it mails going out from the site could end up falling foul of spam filters (I'm not sending spam but without the envelope sender set I believe they may be flagged as such).
The simplest/best option seems to be from the PHP manual:
" -f <sender address> - This is why setting the user under which apache is running to be a trusted user allows you to use this option (because sendmail is being invoked by the apache user)."
Can anyone give me any pointers to setting the user under which apache is running to be a trusted user. I'm searching for documentation on this at the moment but haven't been able to find anything yet.
Pulling my hair out a bit at the moment trying to figure it out so any help or advice would be great. Thanks.:)
