Justin H Haynes wrote:

> Thanks Nick Holmes and misc for
> http://www.openbsdsupport.org/GalleryInChroot.html.  It was very
> helpful in getting Gallery working in OpenBSD in the chrooted Apache
> environment for me.  However, I need to use an external smtp server to
> handle registration emails.  I was getting this error message in my
> logs when I tried to use the registration feature:
>
> [Mon Jan  2 10:23:57 2006] [error] PHP Warning:  fsockopen():
> php_network_getaddresses: gethostbyname failed in
> /htdocs/gallery/classes/Mail/smtp.php on line 87
> [Mon Jan  2 10:23:57 2006] [error] PHP Warning:  fsockopen(): unable
> to connect to smtp-server.houston.rr.com:25 in
> /htdocs/gallery/classes/Mail/smtp.php on line 87
>
> So I just copied resolv.conf to /var/www/etc/resolv.conf and it now
> works just fine.
> So, Nick, if you feel like modifying your script:
>
> patch gallery-openbsd-chroot-install.sh << EOF
> 103a104
> > mkdir -p /var/www/etc
> 114a116,118
> > echo 'Copying resolv.conf...'
> > cd /var/www/etc
> > cp /etc/resolv.conf .
> EOF
>
>
> Thanks again,
>
> Justin H Haynes

Not sure that just copying /etc/resolv.conf wholesale without sanity
checking is such a good idea... folks on dynamic IP's (PPPoE and cable,
for instance) may have ISPs who assign DNS service based on which IP
address the client gets.  A better idea may be to append a couple of the
OpenNIC (or other 3rd party DNS service) Tier 2 DNS servers to
/var/www/etc/resolv.conf or /v/w/e/r.c.tail.

Reply via email to