PDA

View Full Version : PHP mail() Chrooted Apache


dualxeon
20th August 2007, 14:47
Hi,
I have just set up my apache installation on debian etch with mod_chroot. I have chrooted apache to /var/www .

However i have been having problems sending emails with php mail() , i had a look on the internet and found that many people are having this problem becuase the sendmail program is outside the chroot. I had a look on the internet and found this tutorial to fix the problem:

http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html

I followed this tutorial but still cant send emails have oyu got any idea how can get it to work?

Thanks,
Alex

dualxeon
20th August 2007, 14:54
Also if from root you run the command chroot /var/www it works correctly, i was wondering how would i test the sendmail in the chroot.
Thanks,
Alex

falko
21st August 2007, 17:45
Did you put sendmail into your chroot jail?
Do you get any errors (also in the logs) when you try to send mails?

dualxeon
21st August 2007, 18:35
Yea, i have got the mini_sendmail in /usr/sbin/sendmail inside the chroot jail.

I checked the mail.log but the email doesnt appear to even get that far, there nothing in the mail.log

Do you know how to send a message with send mail? I could try sending a message from it to test it, but i dont how.

Thanks,
Alex

dualxeon
22nd August 2007, 00:10
Thanks for your help, but problem is solved

Ben
22nd August 2007, 10:15
Could you explain the solution for others having the same problem, once?

thx ;)