What would be "best practise" for letting Drupal mail outgoing when apache is chrooted?

*One way would be to link in the sendmail executable and the /bin/sh but that doesnt seem to cut it securitywise.

*Another way could be to install a mta in the chrooted enviroment but that seems like a over doing it.

The option im actually looking for is for the drubalsite to use a external server as a relay but i cant understand where to configure that. I have been looking at the "php.ini" and the drupal "user.module" for a setting like this.

Im trying to be as security focused as possible here. Performance/delays isnt that much of relevance. I could even consider a hack to store a requestfile localy on the server and handle the que manually but that seems like a last resort.

Scoop has an option for smtp-server but i had trouble with some other modules there. So how is it best done with drupal?

Comments

Dries’s picture

It is PHP that handles outgoing mail, not Drupal. See PHP's mail() documentation for more information. However, if you want to send mail and you are chroot-ed, chances are you'll have to use third-party mail code and integrate it with Drupal. Not sure if there is such code available in Drupal's contributions repository ...

Bèr Kessels’s picture

PHP cannot deliver its mail when in in chrooted jail. So you need a wrapper. The safest is to make a wrapper that mails to localhost:25

Suggestions for other wrappers, or solutions are most welcome, though.

---
Bèr Kessels
Professional www.webschuur.com
Personal bler.webschuur.com

bogo112’s picture

Hello all

This is just an answer to give the solution for people searching this
Like Ber Kessels said the best solution is to mail localhost

http://drupal.org/project/smtp

Bye