PHP mail() Chrooted Apache

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

  1. dualxeon

    dualxeon New Member

    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
     
  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.
    Thanks,
    Alex
     
  3. falko

    falko Super Moderator Howtoforge Staff

    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.

    Thanks,
    Alex
     
    Last edited: Aug 21, 2007
  5. dualxeon

    dualxeon New Member

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

    Ben Active Member Moderator

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

    thx ;)
     

Share This Page