Subject: Re: telnet -4 command switches on IPv4 mode for other apps
To: Andreas Ha?feld <andreas@hassfeld.net>
From: Alasdair <alasdair@iprimus.com.au>
List: netbsd-users
Date: 02/08/2007 23:21:20
On Thu, Feb 08, 2007 at 12:35:59PM +0100, Andreas Ha?feld wrote:
> Alasdair wrote:
> >Hi,
> >
> >I have been struggling for sometime to send email from NetBSD 3.0.1 with
> >msmtp via mutt. I finally worked out(?) that it is a problem with a router
> >that advertises IPv6 but does not handle it. I had this problem with
> >fetching packages via FTP using pkgsrc, which was fixed by forcing FTP to
> >use IPv4. I tried to connect via telnet to my isp failed. Tried again
> >using -4 option succeeded.See the following code
> >
> >telnet smtp.iprimus.com.au 25
> >Trying 1.0.0.0...
> >telnet: Unable to connect to remote host: Connection timed out
> >$ telnet -4 smtp.iprimus.com.au 25
> >Trying 202.138.53.12...
>
> The resolved address 1.0.0.0 seems strange...
>
> >Also afer invoking telnet -4 msmtp is able to connect to my isp and send
> >messages. This only lasts for a short while. I have tried all sorts of
> >things to deliberately get it to revert to failing to send, opening mutt
> >in another xterm, trying to connect via telnet without the -4 option, the
> >only thing that makes it revert s time as far as I can tell.
> >It seems that using telnet -4 is opening sort of gateway that then shuts
> >after some time.
>
> Could that be an expiring dns record in your caching name server?
>
> Could you try this when the "gateway" expired and it's not working:
>
> dig -4 smtp.iprimus.com.au
> dig -6 smtp.iprimus.com.au
> dig -4 smtp.iprimus.com.au
>
> Maybe that gives a hint.
>
> >Is it forcing msmtp to use IPv4? There does not seem to be any way of
> >doing that that I can see from the msmtp man pages.
> >
> >Also how do I enable this situation (being able to send mail using msmtp)
> >permanently ? I can see that it could be done by getting mutt to invoke a
> >script that would mimic the actions I just described, but it would be
> >clunky, I don't have that skill level yet and it would "timeout" after a
> >while. Is there a conf file I could edit or some ENV to change or
> >something of that nature?
> >
> >Regards,
> >
> >Alasdair
> >
>
> Yours,
> Andreas
Hi,
Here is the result of your suggestion, could you translate it's significance to my problem, my knowledge is very weak in this area.
$ dig -4 smtp.iprimus.com.au
; <<>> DiG 9.3.0 <<>> -4 smtp.iprimus.com.au
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58010
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;smtp.iprimus.com.au. IN A
;; ANSWER SECTION:
smtp.iprimus.com.au. 89 IN A 202.138.53.12
;; Query time: 24 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Thu Feb 8 23:06:42 2007
;; MSG SIZE rcvd: 53
$ dig -6 smtp.iprimus.com.au
/home/builds/ab/netbsd-3-0-1-RELEASE/src/dist/bind/lib/isc/unix/socket.c:1121: i
nternal_send: ::ffff:192.168.1.254#53: Invalid argument
/home/builds/ab/netbsd-3-0-1-RELEASE/src/dist/bind/lib/isc/unix/socket.c:1121: i
nternal_send: ::ffff:192.168.1.254#53: Invalid argument
/home/builds/ab/netbsd-3-0-1-RELEASE/src/dist/bind/lib/isc/unix/socket.c:1121: i
nternal_send: ::ffff:192.168.1.254#53: Invalid argument
; <<>> DiG 9.3.0 <<>> -6 smtp.iprimus.com.au
;; global options: printcmd
;; connection timed out; no servers could be reached
$ dig -4 smtp.iprimus.com.au
; <<>> DiG 9.3.0 <<>> -4 smtp.iprimus.com.au
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21399
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;smtp.iprimus.com.au. IN A
;; ANSWER SECTION:
smtp.iprimus.com.au. 10000 IN A 202.138.53.12
;; Query time: 2 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Thu Feb 8 23:10:13 2007
;; MSG SIZE rcvd: 53
Regards,
Alasdair