From owner-freebsd-hackers Thu Aug 29 11:20:43 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0144E37B400; Thu, 29 Aug 2002 11:20:20 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [216.187.105.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id B26BD43E42; Thu, 29 Aug 2002 11:20:18 -0700 (PDT) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 12FE03F28; Thu, 29 Aug 2002 14:20:17 -0400 (EDT) From: "Dan Langille" To: Gregory Neil Shapiro Date: Thu, 29 Aug 2002 14:18:25 -0400 MIME-Version: 1.0 Subject: Re: why does this sendmail connection take so long? Cc: freebsd-hackers@FreeBSD.ORG Message-ID: <3D6E2D31.29065.8EDA44C7@localhost> In-reply-to: <15726.24717.960548.333189@horsey.gshapiro.net> References: <3D6E243B.1515.8EB744E7@localhost> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 29 Aug 2002 at 10:57, Gregory Neil Shapiro wrote: > dan> xeon.example.org.org. 5S IN A 127.0.0.1 > ^^^^^^^^^^^^^^^^^^^^^ > > example.org's DNS zone has a mistake if it has an NS record pointing to a > bogus hostname like that (and what's worse the bogus hostname resolves). Ugh. The NS entry was missing a trailing period. Thank you. > dan> dns_getcanonname: trying localhost.example.org (AAAA) > dan> ;; res_querydomain(localhost, example.org, 1, 28) > ... > > dan> dan@m20.example.org... Connecting to xeon.example.org. via relay... > > localhost.example.org appears to map to xeon.example.org, perhaps via > /etc/hosts? It did. It no longer does. > My first suggestion would be to fix your DNS zone as mentioned above. On a side note, I noticed that localhost-v6.rev was not being used. I fixed that as well. > Then, try the test again with more debugging: > > echo 'hi there' | /usr/sbin/sendmail -v -d8.8,16.10,61.11 dan@m20.example.org See "*** delay occurs here" below. [dan@xeon:/etc/namedb] $ echo 'hi there' | /usr/sbin/sendmail -v - d8.8,16.10,61.11 dan@m20.example.org sm_gethostbyname(xeon.example.org, 28)... ;; res_querydomain(xeon.example.org, , 1, 28) ;; res_query(xeon.example.org, 1, 28) ;; res_mkquery(0, xeon.example.org, 1, 28) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23051 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; xeon.example.org, type = AAAA, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23051 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; xeon.example.org, type = AAAA, class = IN example.org. 1D IN SOA ns1.example.org. soa.example.org. ( 2002082903 ; serial 3H ; refresh 30M ; retry 4w2d ; expiry 1D ) ; minimum ;; rcode = 0, ancount=0 ;; res_querydomain(xeon.example.org, example.org, 1, 28) ;; res_query(xeon.example.org.example.org, 1, 28) ;; res_mkquery(0, xeon.example.org.example.org, 1, 28) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23052 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; xeon.example.org.example.org, type = AAAA, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 23052 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; xeon.example.org.example.org, type = AAAA, class = IN example.org. 1D IN SOA ns1.example.org. soa.example.org. ( 2002082903 ; serial 3H ; refresh 30M ; retry 4w2d ; expiry 1D ) ; minimum ;; rcode = 3, ancount=0 failure failure sm_gethostbyname(xeon.example.org, 2)... xeon.example.org addr: IPv6:c0a8:12:: dns_getcanonname(m20.example.org, trymx=1) dns_getcanonname: trying m20.example.org. (AAAA) ;; res_querydomain(m20.example.org, , 1, 28) ;; res_query(m20.example.org., 1, 28) ;; res_mkquery(0, m20.example.org., 1, 28) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23053 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; m20.example.org, type = AAAA, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23053 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; m20.example.org, type = AAAA, class = IN example.org. 1D IN SOA ns1.example.org. soa.example.org. ( 2002082903 ; serial 3H ; refresh 30M ; retry 4w2d ; expiry 1D ) ; minimum ;; rcode = 0, ancount=0 NO: errno=19, h_errno=4 dns_getcanonname: trying m20.example.org. (A) ;; res_querydomain(m20.example.org, , 1, 1) ;; res_query(m20.example.org., 1, 1) ;; res_mkquery(0, m20.example.org., 1, 1) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23054 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; m20.example.org, type = A, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23054 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; m20.example.org, type = A, class = IN m20.example.org. 1M IN A 216.187.106.227 example.org. 1M IN NS xeon.example.org. xeon.example.org. 1M IN A 192.168.0.18 YES dns_getcanonname: m20.example.org getmxrr([localhost], droplocalhost=1) dns_getcanonname(localhost, trymx=0) dns_getcanonname: trying localhost.example.org (AAAA) ;; res_querydomain(localhost, example.org, 1, 28) ;; res_query(localhost.example.org, 1, 28) ;; res_mkquery(0, localhost.example.org, 1, 28) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23055 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; localhost.example.org, type = AAAA, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23055 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; localhost.example.org, type = AAAA, class = IN example.org. 1D IN SOA ns1.example.org. soa.example.org. ( 2002082903 ; serial 3H ; refresh 30M ; retry 4w2d ; expiry 1D ) ; minimum ;; rcode = 0, ancount=0 NO: errno=19, h_errno=4 dns_getcanonname: trying localhost.example.org (A) ;; res_querydomain(localhost, example.org, 1, 1) ;; res_query(localhost.example.org, 1, 1) ;; res_mkquery(0, localhost.example.org, 1, 1) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23056 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; localhost.example.org, type = A, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23056 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; localhost.example.org, type = A, class = IN localhost.example.org. 1M IN A 127.0.0.1 example.org. 1M IN NS xeon.example.org. xeon.example.org. 1M IN A 192.168.0.18 YES dns_getcanonname: localhost.example.org dan@m20.example.org... Connecting to localhost.example.org. via relay... sm_gethostbyname(localhost.example.org., 28)... ;; res_querydomain(localhost.example.org., , 1, 28) ;; res_query(localhost.example.org, 1, 28) ;; res_mkquery(0, localhost.example.org, 1, 28) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23057 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; localhost.example.org, type = AAAA, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23057 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; localhost.example.org, type = AAAA, class = IN example.org. 1D IN SOA ns1.example.org. soa.example.org. ( 2002082903 ; serial 3H ; refresh 30M ; retry 4w2d ; expiry 1D ) ; minimum ;; rcode = 0, ancount=0 failure sm_gethostbyname(localhost, 28)... localhost alias: localhost.example.org addr: IPv6:::1 makeconnection (localhost.example.org. [IPv6:::1].25 (28)) makeconnection: fd=6 *** delay occurs here. Connect failed (Operation timed out with localhost.example.org.); retrying with AF_INET.... sm_gethostbyname(localhost.example.org., 2)... ;; res_querydomain(localhost.example.org., , 1, 1) ;; res_query(localhost.example.org, 1, 1) ;; res_mkquery(0, localhost.example.org, 1, 1) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23058 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; localhost.example.org, type = A, class = IN ;; Querying server (# 1) address = 127.0.0.1 ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23058 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; localhost.example.org, type = A, class = IN localhost.example.org. 1M IN A 127.0.0.1 example.org. 1M IN NS xeon.example.org. xeon.example.org. 1M IN A 192.168.0.18 localhost.example.org addr: IPv6:7f00:1:: makeconnection (localhost.example.org. [127.0.0.1].25 (2)) makeconnection: fd=6 220 xeon.example.org ESMTP Sendmail 8.12.5/8.12.5; Thu, 29 Aug 2002 14:13:31 -0400 (EDT) >>> EHLO xeon.example.org 250-xeon.example.org Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From: SIZE=9 250 2.1.0 ... Sender ok >>> RCPT To: >>> DATA 250 2.1.5 ... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 g7TIDVRq084370 Message accepted for delivery dan@m20.example.org... Sent (g7TIDVRq084370 Message accepted for delivery) Closing connection to localhost.example.org. >>> QUIT 221 2.0.0 xeon.example.org closing connection [dan@xeon:/etc/namedb] $ Thank you. -- Dan Langille I'm looking for a computer job: http://www.freebsddiary.org/dan_langille.php To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message