Re: Gallery on OpenBSD 3.8: resolv.conf needed for email registration through remote smtp
On Tue, Jan 03, 2006 at 06:18:47PM -0500, Chris Zakelj wrote: > Joachim Schipper wrote: > > >I'm afraid this'll result in lots of questions on [EMAIL PROTECTED] I, for > >one, > >would be stumped as to why I'd want OpenNIC. > > > No particular reason. I just needed someone for the sake of example, > and they're the ones who sprang to mind. My use of them was in no way > an indication of support, just that their name was easy to remember. Oh, I'd understand *that* (or, rather, Google would make me understand that). The problem is more along the lines of 'why doesn't /etc/resolv.conf work?'. Is there a general policy on this sort of thing somewhere? It's not like this is the only thing ever to need resolv.conf in a chroot, and it would make sense to follow existing packages and provide an extra README or note in the description if the standard is not to do anything about resolv.conf (as seems to be the case). This discussion is perhaps best re-started on [EMAIL PROTECTED] Joachim
Re: Gallery on OpenBSD 3.8: resolv.conf needed for email registration through remote smtp
Joachim Schipper wrote: >I'm afraid this'll result in lots of questions on [EMAIL PROTECTED] I, for one, >would be stumped as to why I'd want OpenNIC. > No particular reason. I just needed someone for the sake of example, and they're the ones who sprang to mind. My use of them was in no way an indication of support, just that their name was easy to remember.
Re: Gallery on OpenBSD 3.8: resolv.conf needed for email registration through remote smtp
On Tue, Jan 03, 2006 at 10:34:48AM -0600, Justin H Haynes wrote: > Chris Zakelj wrote: > Good Idea. Actually, since everyone may not even need this little hack, > I've just changed it to create in /var/www/etc/: > resolv.conf.local > resolv.conf.OpenNIC > Then users can copy one if they need it. here is a diff to the original > script. > patch gallery-openbsd-chroot-install.sh << EOF > 64c64,72 > < #16After it's all working, cd to /var/www/htdocs/gallery and run > --- > >#16For Email functionality, you may need a resolv.conf in the > ># chrooted environment if you are using a remote smtp server. > ># This script will have placed two files in /var/www/etc: > ># resolv.conf.local (from /etc), and resolv.conf.OpenNIC (from > ># OpenNIC. If you need one, then just > ># cd /var/www/etc > ># cp resolv.conf > ># (1/3/2006: Justin at Haynes dot net) > >#17After it's all working, cd to /var/www/htdocs/gallery and run > 103a112 > >mkdir -p /var/www/etc > 104a114,118 > ># Get nameservers from OpenNIC. > ># > >echo "Getting nameservers from OpenNIC" > >cd /var/www/etc/ > >lynx -dump http://www.opennic.unrated.net/cgi-bin/get_tier2_txt.sh | grep > >-v ^$ | awk '{print "nameserver " $2}' > resolv.conf.OpenNIC > 114a129,131 > >echo 'Copying resolv.conf...' > >cd /var/www/etc > >cp /etc/resolv.conf resolv.conf.local > EOF I'm afraid this'll result in lots of questions on [EMAIL PROTECTED] I, for one, would be stumped as to why I'd want OpenNIC. It might be worthwhile noting that if your nameservers change a lot, it might be a good idea to put OpenNIC servers in chroot'ed resolv.conf files, as those will always be accessible and functional. (Alternatively, copy /etc/resolv.conf after each change - isn't there a dhclient hook for such a thing?) Joachim
Re: Gallery on OpenBSD 3.8: resolv.conf needed for email registration through remote smtp
Chris Zakelj wrote: 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. Good Idea. Actually, since everyone may not even need this little hack, I've just changed it to create in /var/www/etc/: resolv.conf.local resolv.conf.OpenNIC Then users can copy one if they need it. here is a diff to the original script. Also, ./secure.sh is on its own line in the original script. I've left this alone here, as it doesn't hurt anything, and it's probably a good idea anyway. patch gallery-openbsd-chroot-install.sh << EOF 64c64,72 < #16After it's all working, cd to /var/www/htdocs/gallery and run --- #16For Email functionality, you may need a resolv.conf in the # chrooted environment if you are using a remote smtp server. # This script will have placed two files in /var/www/etc: # resolv.conf.local (from /etc), and resolv.conf.OpenNIC (from # OpenNIC. If you need one, then just # cd /var/www/etc # cp resolv.conf # (1/3/2006: Justin at Haynes dot net) #17After it's all working, cd to /var/www/htdocs/gallery and run 103a112 mkdir -p /var/www/etc 104a114,118 # Get nameservers from OpenNIC. # echo "Getting nameservers from OpenNIC" cd /var/www/etc/ lynx -dump http://www.opennic.unrated.net/cgi-bin/get_tier2_txt.sh | grep -v ^$ | awk '{print "nameserver " $2}' > resolv.conf.OpenNIC 114a129,131 echo 'Copying resolv.conf...' cd /var/www/etc cp /etc/resolv.conf resolv.conf.local EOF
Re: Gallery on OpenBSD 3.8: resolv.conf needed for email registration through remote smtp
You could try mini_sendmail_chrooted package On 1/2/06, Justin H Haynes <[EMAIL PROTECTED]> wrote: > Thanks Nick Holmes and misc for > http://www.openbsdsupport.org/GalleryInChroot.html. > However, I need to use an external smtp server to handle > registration emails.
Re: Gallery on OpenBSD 3.8: resolv.conf needed for email registration through remote smtp
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.
Gallery on OpenBSD 3.8: resolv.conf needed for email registration through remote smtp
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