PHP mail() Chrooted Apache

Discussion in 'Server Operation' started by dualxeon, Aug 20, 2007.

  1. dualxeon

    dualxeon New Member

    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:

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

  2. dualxeon

    dualxeon New Member

    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.
  3. falko

    falko Super Moderator ISPConfig Developer

    Did you put sendmail into your chroot jail?
    Do you get any errors (also in the logs) when you try to send mails?
  4. dualxeon

    dualxeon New Member

    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.

    Last edited: Aug 21, 2007
  5. dualxeon

    dualxeon New Member

    Thanks for your help, but problem is solved
  6. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Could you explain the solution for others having the same problem, once?

    thx ;)

Share This Page