From owner-freebsd-questions Tue Jul 11 1:15:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from adsl-63-194-112-53.dsl.snlo01.pacbell.net (adsl-63-194-112-53.dsl.snlo01.pacbell.net [63.194.112.53]) by hub.freebsd.org (Postfix) with SMTP id 99CE437B76D for ; Tue, 11 Jul 2000 01:15:30 -0700 (PDT) (envelope-from bsd@info-logix.com) Received: (qmail 32214 invoked from network); 11 Jul 2000 08:18:53 -0000 Received: from unknown (HELO ibix) (192.168.1.3) by adsl-63-194-112-53.dsl.snlo01.pacbell.net with SMTP; 11 Jul 2000 08:18:53 -0000 From: "Hank Wethington" To: , Subject: RE: Having ppp(8) Set Hostname Date: Tue, 11 Jul 2000 01:14:16 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 In-Reply-To: <20000711002558.D182@dialin-client.earthlink.net> Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is probably a bad place to say so, but instead of having you machine try to send mail when using earhtlink, just use E-links mail servers, they allow open relay. Of course if you are sending to someone who black lists e-link then your stuck with your method. Normally when doing a reverse dns lookup, it is not just looking for the ip, since it can be spoofed, but the host name to match the ip. i.e. adsl-63-194-112-63.dsl.snlo01.pacbell.net Not sure what it would be for e-link though. Hank -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Crist J. Clark Sent: Tuesday, July 11, 2000 12:26 AM To: freebsd-questions@freebsd.org Subject: Having ppp(8) Set Hostname My mail forwarding recently stopped working unless my PC has a valid hostname. I am trying to get ppp(8) to set the hostname automatically... but it turning out to be a lot harder than I thought. I am trying to get it done in a ppp.linkup, EarthLink: shell /root/sethostfromip MYADDR !bg /usr/sbin/sendmail -q !bg su cjc -c /usr/local/bin/fetchmail The script 'sethostfromip' does a reverse-lookup of MYADDR and tries to set the hostname accordingly (yeah, a quick program would probably be better, but I'm lazy), if [ expr $1 : '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' > /dev/null 2>&1 ]; then IP=$1 else IP=`ifconfig tun0 | awk '/inet/ { print $2 }'` fi HOSTNAME=`nslookup $IP | awk '/^Name:/ { print $2 }'` hostname $HOSTNAME However, the nslookup keeps failing and neither the sendmail or fetchmail runs very reliably. Here the stderr output from the sethostfromip when I wake up the PPP connection right now, *** Can't find server name for address 207.217.126.81: Timed out *** Can't find server name for address 207.217.77.82: Timed out *** Default servers are not available Here is the ppp.log showing those actually being run, Jul 11 00:22:31 dialin-client ppp[58]: tun0: Command: EarthLink: shell /root/sethostfromip MYADDR Jul 11 00:23:03 dialin-client ppp[58]: tun0: Command: EarthLink: !bg /usr/sbin/sendmail -q Jul 11 00:23:03 dialin-client ppp[58]: tun0: Command: EarthLink: !bg su cjc -c /usr/local/bin/fetchmail Others must be setting new hostname when they do a dialup, right? How do you do it? I'm suprised it's not an option built into ppp... Or is it and I have not managed to find it? -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message