2

I'm trying to use the mail() function in PHP on a Debain Linux server.

I have 2 web servers running. One is in a chrooted setup.

The server that's not chrooted works fine, the other one wont send email.

Any idea how I can setup emailing in the chrooted setup?

Petah
  • 650
  • 2
  • 13
  • 24

2 Answers2

1

There is a small utility called "mail" or "email" or something like that, which can be installed as a simple replacement for sendmail, postfix, qmail, ... Just install to the chrooted environment and redirect the mails to the mailserver outside the jail.

EEAA
  • 109,363
  • 18
  • 175
  • 245
gromit
  • 76
  • 2
1

PHP uses the external sendmail program to send E-mail messages (1, 2). To avoid installing it in its entirety in the chroot jail, lightweight programs exist that can provide the necessary functionality within the jail. How-tos for setting this up exist.

PleaseStand
  • 246
  • 1
  • 6
  • Thanks, I found this link after searching some of this information. http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html – Petah Dec 02 '10 at 01:59