From owner-freebsd-questions Mon Oct 21 4:10:30 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1FBE37B401 for ; Mon, 21 Oct 2002 04:10:28 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90AB643E65 for ; Mon, 21 Oct 2002 04:10:27 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id g9LBAPei028347 for ; Mon, 21 Oct 2002 12:10:25 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id g9LBAKQ1028346 for freebsd-questions@FreeBSD.ORG; Mon, 21 Oct 2002 12:10:20 +0100 (BST) Date: Mon, 21 Oct 2002 12:10:20 +0100 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: fetchmail protocol error caused by DNS timeout - solution? Message-ID: <20021021111020.GC27016@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <20021020215055.GA586@kirk.dlee.org> <20021020215847.GA936@kirk.dlee.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021020215847.GA936@kirk.dlee.org> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-14.1 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_MUTT version=2.41 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Oct 20, 2002 at 05:58:47PM -0400, Doug Lee wrote: > CORRECTION: It's not an rDNS lookup that's causing my problem; it's a > straight DNS lookup of the From: address, I think. Example: I just > spotted a message coming in from m7.shineandsparkle.com which plugged > up my ``fetchmail'' download (I have to go to the source mailbox and > hand-delete the thing to get the rest of them to come in by > fetchmail). Pinging m7.shineandsparkle.com causes a long pause > followed by > > ping: cannot resolve m7.shineandsparkle.com.: Host name lookup failure > > It appears that the same DNS lookup, when initiated by ``fetchmail,'' > is taking so long that the remote mail server gives up waiting, so > that when DNS finally quits trying, ``fetchmail'' issues a protocol > error, only to try again later and go through the same sequence. > > Also, this problem is not fixed by using my ISP's DNS server instead > of my own. I assume you're using fetchmail(1) to feed the mail into the sendmail(8) process on your own machine, which is likely the process initiating the DNS lookups that are stalling everything. One thing that may be biting you is IPv6 support in sendmail. As all good Unix programs should nowadays, it uses getaddrinfo(3) rather than gethostbyname(3) and it searches first for an AAAA record in the DNS. Usually the DNS server will respond very quickly that such a record doesn't exist and the next lookup will be for the IPv4 A record, which should succeed. Certain broken DNS servers however return the wrong code when queried for a resource record type they don't recognise, leading to delays similar to what you're seeing. Check your /etc/mail/`hostname`.mc file --- there's been a workaround for this problem in there since May this year, namely: define(`confBIND_OPTS', `WorkAroundBrokenAAAA') You can tweak the resolver timeouts used by sendmail(8): grep for 'confTO_RESOLVER' in /usr/share/sendmail/cf/README (DANGER Will Robinson! -- fiddling with resolver timeouts is not for the faint hearted). Other things that may bite you are ident queries, but those are set to timeout after 5s by default, so they shouldn't have the effect you're seeing. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message