Re: PHP mini_sendmail problems
femail-chroot will already be installed; the PHP packages have it as a run dependency. On 2013-03-14, Richard Toohey richardtoo...@paradise.net.nz wrote: Also check out /usr/local/share/doc/pkg-readmes/femail-chroot-0.98p2 Yes this is important, it covers the 2 most common errors.
Re: PHP mini_sendmail problems
On 2013-03-14 21:02, John Tate wrote: It seems to be a problem with drupal, I wrote my own php script that could send mail without issues. I have no idea how such a problem is possible unless drupal doesn't use php's mail() but I can't find anyone with similar problems. I didn't notice the log entries because they don't have a timestamp and I thought they were just wrap around when I first posted here. Sorry for wasting everyone's time. I had that exact problem a while ago, with chroot():ed httpd, php, mini_sendmail and Drupal. Turned out Drupal messes up the arguments, which made mini_sendmail unhappy. Can't remember exactly what the problem was now, but I solved it by renaming /bin/mini_sendmail to /bin/mini_sendmail.bin and replacing it with a shell script that corrected the arguments and exec:d /bin/mini_sendmail.bin. /B On Fri, Mar 15, 2013 at 6:57 AM, Pascal Stumpf pascal.stu...@cubes.dewrote: On Thu, 14 Mar 2013 20:12:52 +0100, Stefan Sperling wrote: On Thu, Mar 14, 2013 at 06:51:54PM +, Alexey E. Suslikov wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. More precisely, the femail-chroot package. And you need /usr/libexec/ld.so inside of the /var/www chroot dir. Not any more. -static now implies -nopie when linking. Else, femail won't run inside chroot (on 5.3, not sure if 5.2 requires this). -- internetlabbet.se / work: +46 8 551 124 80 / Words must Benny Lofgren/ mobile: +46 70 718 11 90 / be weighed, / fax:+46 8 551 124 89/not counted. /email: benny -at- internetlabbet.se
Re: PHP mini_sendmail problems
On 2013-03-14, John Tate j...@johntate.org wrote: It seems to be a problem with drupal, I wrote my own php script that could send mail without issues. I have no idea how such a problem is possible unless drupal doesn't use php's mail() but I can't find anyone with similar problems. ah - always good to mention the exact thing that isn't working rather than trying to simplify. for drupal6 I used phpmailer, which talks SMTP directly thus avoiding the need to have /bin/sh in the jail. many PHP things have some way to do this; mail() isn't always that reliable in hosting environments. there is a version of phpmailer for drupal7 but only a development release so far (also I haven't used d7 yet so haven't looked at adding it to ports).
Re: PHP mini_sendmail problems
John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports.
Re: PHP mini_sendmail problems
Strange port, I did make and then make install but there was no output from make install, but it seems to run anyway, but I can't find it in whereis. # make clean === Cleaning for femail-0.98 # make === Verifying specs: c === found c.65.0 === Checking files for femail-0.98 `/usr/ports/distfiles/femail-0.98.tgz' is up to date. (SHA256) femail-0.98.tgz: OK === Extracting for femail-0.98 === Patching for femail-0.98 === Configuring for femail-0.98 === Building for femail-0.98 cc -O2 -pipe -DHAS_FGETLN -DHAS_STRLCPY -c femail.c cc -O2 -pipe -DHAS_FGETLN -DHAS_STRLCPY -c openbsd_compat.c cc femail.o openbsd_compat.o -o femail cc -static femail.o openbsd_compat.o -o femail-static # make install # femail j...@johntate.org Hello, john. # whereis femail # How do I put femail into my /var/www? On Fri, Mar 15, 2013 at 5:51 AM, Alexey E. Suslikov alexey.susli...@gmail.com wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. -- www.johntate.org
Re: PHP mini_sendmail problems
On Thu, Mar 14, 2013 at 06:51:54PM +, Alexey E. Suslikov wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. More precisely, the femail-chroot package. And you need /usr/libexec/ld.so inside of the /var/www chroot dir. Else, femail won't run inside chroot (on 5.3, not sure if 5.2 requires this).
Re: PHP mini_sendmail problems
On Thu, Mar 14, 2013 at 9:12 PM, Stefan Sperling s...@openbsd.org wrote: On Thu, Mar 14, 2013 at 06:51:54PM +, Alexey E. Suslikov wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. More precisely, the femail-chroot package. And you need /usr/libexec/ld.so inside of the /var/www chroot dir. Else, femail won't run inside chroot (on 5.3, not sure if 5.2 requires this). hmmm... older setups I have seen didn't require ld.so... why it is needed?
Re: PHP mini_sendmail problems
I installed femail-chroot and put /usr/libexec/ld.so in /var/www/usr/libexec/ld.so and updated /etc/php-5.2.ini but it still doesn't work. On Fri, Mar 15, 2013 at 6:14 AM, Alexey Suslikov alexey.susli...@gmail.comwrote: On Thu, Mar 14, 2013 at 9:12 PM, Stefan Sperling s...@openbsd.org wrote: On Thu, Mar 14, 2013 at 06:51:54PM +, Alexey E. Suslikov wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. More precisely, the femail-chroot package. And you need /usr/libexec/ld.so inside of the /var/www chroot dir. Else, femail won't run inside chroot (on 5.3, not sure if 5.2 requires this). hmmm... older setups I have seen didn't require ld.so... why it is needed? -- www.johntate.org
Re: PHP mini_sendmail problems
From the end of error_log: femail: no recipients On Fri, Mar 15, 2013 at 6:31 AM, John Tate j...@johntate.org wrote: I installed femail-chroot and put /usr/libexec/ld.so in /var/www/usr/libexec/ld.so and updated /etc/php-5.2.ini but it still doesn't work. On Fri, Mar 15, 2013 at 6:14 AM, Alexey Suslikov alexey.susli...@gmail.com wrote: On Thu, Mar 14, 2013 at 9:12 PM, Stefan Sperling s...@openbsd.org wrote: On Thu, Mar 14, 2013 at 06:51:54PM +, Alexey E. Suslikov wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. More precisely, the femail-chroot package. And you need /usr/libexec/ld.so inside of the /var/www chroot dir. Else, femail won't run inside chroot (on 5.3, not sure if 5.2 requires this). hmmm... older setups I have seen didn't require ld.so... why it is needed? -- www.johntate.org -- www.johntate.org
Re: PHP mini_sendmail problems
On Thu, Mar 14, 2013 at 9:35 PM, John Tate j...@johntate.org wrote: From the end of error_log: femail: no recipients femail commandline switches aren't 100% sendmail- compatible. check php.ini on how you pass recipients to femail.
Re: PHP mini_sendmail problems
On Thu, 14 Mar 2013 20:12:52 +0100, Stefan Sperling wrote: On Thu, Mar 14, 2013 at 06:51:54PM +, Alexey E. Suslikov wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. More precisely, the femail-chroot package. And you need /usr/libexec/ld.so inside of the /var/www chroot dir. Not any more. -static now implies -nopie when linking. Else, femail won't run inside chroot (on 5.3, not sure if 5.2 requires this).
Re: PHP mini_sendmail problems
It seems to be a problem with drupal, I wrote my own php script that could send mail without issues. I have no idea how such a problem is possible unless drupal doesn't use php's mail() but I can't find anyone with similar problems. I didn't notice the log entries because they don't have a timestamp and I thought they were just wrap around when I first posted here. Sorry for wasting everyone's time. On Fri, Mar 15, 2013 at 6:57 AM, Pascal Stumpf pascal.stu...@cubes.dewrote: On Thu, 14 Mar 2013 20:12:52 +0100, Stefan Sperling wrote: On Thu, Mar 14, 2013 at 06:51:54PM +, Alexey E. Suslikov wrote: John Tate john at johntate.org writes: I've been trying to get PHP to be able to email from a chrooted apache server. Running without chroot is not an option. I can't find clear documentation on doing this, and the logs don't contain any errors I can find about the problem. you need femail from ports. More precisely, the femail-chroot package. And you need /usr/libexec/ld.so inside of the /var/www chroot dir. Not any more. -static now implies -nopie when linking. Else, femail won't run inside chroot (on 5.3, not sure if 5.2 requires this). -- www.johntate.org
Re: PHP mini_sendmail problems
On 03/15/13 08:41, Alexey Suslikov wrote: On Thu, Mar 14, 2013 at 9:35 PM, John Tate j...@johntate.org wrote: From the end of error_log: femail: no recipients femail commandline switches aren't 100% sendmail- compatible. check php.ini on how you pass recipients to femail. Also check out /usr/local/share/doc/pkg-readmes/femail-chroot-0.98p2