I've installed mini_sendmail and dropped it in my jail:
/var/chroot/apache/usr/sbin/mini_sendmail
I then changed the sendmail_path in /etc/php/apache2-php4/php.ini to either:
/var/chroot/apache/usr/sbin/mini_sendmail
or
/usr/sbin/mini_sendmail
I get the exact same result.. which is no mail.. no error. Just to
clarify, I restart the service with every change.
I also noticed in your box (Apache Security p.47).. that you mention
adding SMTP=localhost for this case.. I also have that set with no luck.
Any ideas how to get this working is greatly appreciated.
Thanks
pb
> m0nkey wrote:
>> Hello All
>>
>> I have a server using mod_security with chroot enabled. I have php/mysql
>> working fine.. except for one piece. the mail function. Anyone know how
>> to
>> get
>> around this? When this fails.. nothing is written to messages or
>> error_log.
>> Removing chroot option, mail() works again.
>
> The problem is not related to mod_security. PHP uses sendmail to
> send email on Unix. Since there is no sendmail in jail the mail()
> function does not work. It's somewhat ironic that PHP knows how
> to send email SMTP but only when it's running on Windows.
>
> My suggestion is to install mini_sendmail:
> http://www.acme.com/software/mini_sendmail/
>
> (Installing sendmail would also work but that would defy the whole
> point of having chroot in the first place.)
>
>
>> Current versions of packages I'm running:
>>
>> mod_security-1.8.6
>
> Why not upgrade to 1.8.7? Have a look at the list of things
> fixed:
>
> http://www.modsecurity.org/documentation/known-issues.html
>
> --
> Ivan Ristic
> Apache Security (O'Reilly) - http://www.apachesecurity.net
> Open source web application firewall - http://www.modsecurity.org
>
>
______________________________________
Get your FREE 100MB email today at http://www.wapda.com
|