From swear@attbi.com  Wed Jan  8 09:13:37 2003
Return-Path: <swear@attbi.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8DDA537B405
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 09:13:37 -0800 (PST)
Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A273843EDC
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 09:13:36 -0800 (PST)
	(envelope-from swear@attbi.com)
Received: from localhost.localdomain (<unknown.domain>[12.242.158.67])
          by sccrmhc01.attbi.com (sccrmhc01) with ESMTP
          id <2003010817133500100rbdn4e>; Wed, 8 Jan 2003 17:13:35 +0000
Received: from localhost.localdomain (localhost [127.0.0.1])
	by localhost.localdomain (8.12.6/8.12.6) with ESMTP id h08HGVBs082918
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 8 Jan 2003 09:16:31 -0800 (PST)
	(envelope-from swear@attbi.com)
Received: (from jojo@localhost)
	by localhost.localdomain (8.12.6/8.12.6/Submit) id h08HGQAB082917;
	Wed, 8 Jan 2003 09:16:26 -0800 (PST)
	(envelope-from swear@attbi.com)
Message-Id: <2rbs2rk1ee.s2r@localhost.localdomain>
Date: 08 Jan 2003 09:16:25 -0800
From: "Gary W. Swearingen" <swear@attbi.com>
Reply-To: swear@attbi.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: sendmail is not well supported by DNS in default 5.0-RC2 install
X-GNATS-Notify:

>Number:         46873
>Category:       conf
>Synopsis:       sendmail is not well supported by DNS in default 5.0-RC2 install
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gshapiro
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 08 09:20:03 PST 2003
>Closed-Date:    Mon Feb 17 11:15:18 PST 2003
>Last-Modified:  Mon Feb 17 11:15:18 PST 2003
>Originator:     Gary W. Swearingen
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
none
>Environment:
FreeBSD localhost.localdomain 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Dec 30 17:04:36 PST 2002     root@localhost.localdomain:/usr/obj/usr/src/sys/GENERIC  i386

================
>Description:

With a presumably common (for home desktops) sendmail config, my MUA
starts a sendmail process to send my message to the "sm-mta" sendmail
daemon, but the MUA-started sendmail hangs up for about 80 seconds,
apparently because it is trying to do DNS look up for "localhost" using
the default IPv6, but the resolver doesn't know how to do reverse lookup
and the standard FreeBSD 5.0 install doesn't have "named" running to
do the job either.  (I fixed MY problem by telling sendmail to use
'[127.0.0.1]' in the "msp" feature, instead of the default.)

More details: I cvsup'ed 5.0-CURRENT 30'dec'02 and rebuilt world/kernel
& mergedmastered.  Then, with sendmail_enable="NO", I rebuilt sendmail's
config files (sendmail.cf and submit.cf) (using "smart host", BTW).
After trying lots of different *.mc changes, I turned on lots of logging
and got this log from the MUA-started sendmail (a child of that, really):

Jan  3 13:42:41 localhost sendmail[63607]: h03Lgf6o063607: assigned id
Jan  3 13:42:41 localhost sendmail[63607]: NOQUEUE: connect from jojo@localhost
Jan  3 13:42:41 localhost sendmail[63607]: h03Lgf6p063607: assigned id
Jan  3 13:42:41 localhost sendmail[63607]: h03Lgf6p063607: from=swear@attbi.com, size=312, class=0, nrcpts=1, msgid=<mhn0mhx63z.0mh@localhost.localdomain>, relay=jojo@localhost
Jan  3 13:42:41 localhost sendmail[63607]: h03Lgf6p063607: queueup ./qfh03Lgf6p063607
Jan  3 13:42:41 localhost sendmail[63611]: h03Lgf6p063607: disconnect level 2
Jan  3 13:42:41 localhost sendmail[63607]: poststats: /var/spool/clientmqueue/sm-client.st: No such file or directory
Jan  3 13:42:41 localhost sendmail[63607]: NOQUEUE: finis, pid=63607
Jan  3 13:42:41 localhost sendmail[63611]: h03Lgf6p063607: in background, pid=63611
Jan  3 13:42:41 localhost sendmail[63611]: h03Lgf6p063607: sendenvelope, flags=0x4605042
Jan  3 13:43:56 localhost sendmail[63611]: h03Lgf6p063607: makeconnection (localhost.localdomain. [IPv6:::1]) failed: Operation timed out with localhost.localdomain.
Jan  3 13:43:56 localhost sendmail[63611]: h03Lgf6p063607: SMTP outgoing connect on localhost
Jan  3 13:44:01 localhost sm-mta[63644]: h03Li1n2063644: assigned id
Jan  3 13:44:01 localhost sm-mta[63644]: NOQUEUE: connect from localhost [127.0.0.1]

The mail quickly thereafter was delivered to my ISP.

"ping localhost" shows "127.0.0.1" being pinged and
"ping6 localhost" shows "::1" being pinged, so forward looks OK, but I
don't know how to test reverse lookup for "127.0.0.1" or "::1" as
"nslookup" seems to mess up when the default DNS server is my ISP and
"nslookup - localhost" gives:
  *** Can't find server name for address ::1: No response from server

================
>How-To-Repeat:
n/a
================
>Fix:
Maybe one of these:

1) Change the resolver to handle localhost the same for IPv6 as it does
for IPv4.  (I didn't have the problem in 4.7 with my custom non-IPv6
kernel.)

2) Change the default FreeBSD intallation config so that a caching-only
DNS server is run by default, or run it only if sendmail is enabled.
>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: "Gary W. Swearingen" <swear@attbi.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/46873: sendmail is not well supported by DNS in default 5.0-RC2 install
Date: Thu, 9 Jan 2003 10:50:15 +0200

 On Wed, Jan 08, 2003 at 09:16:25AM -0800, Gary W. Swearingen wrote:
 > 
 > >Number:         46873
 > >Category:       conf
 > >Synopsis:       sendmail is not well supported by DNS in default 5.0-RC2 install
 > >Responsible:    freebsd-bugs
 > >Originator:     Gary W. Swearingen
 > >Release:        FreeBSD 5.0-CURRENT i386
 > >Organization:
 > none
 > >Environment:
 > FreeBSD localhost.localdomain 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Dec 30 17:04:36 PST 2002     root@localhost.localdomain:/usr/obj/usr/src/sys/GENERIC  i386
 > 
 > ================
 > >Description:
 > 
 > With a presumably common (for home desktops) sendmail config, my MUA
 > starts a sendmail process to send my message to the "sm-mta" sendmail
 > daemon, but the MUA-started sendmail hangs up for about 80 seconds,
 > apparently because it is trying to do DNS look up for "localhost" using
 > the default IPv6, but the resolver doesn't know how to do reverse lookup
 > and the standard FreeBSD 5.0 install doesn't have "named" running to
 > do the job either.  (I fixed MY problem by telling sendmail to use
 > '[127.0.0.1]' in the "msp" feature, instead of the default.)
 
 What does your /etc/resolv.conf file contain?
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 "yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation.

From: swear@attbi.com (Gary W. Swearingen)
To: Peter Pentchev <roam@ringlet.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/46873: sendmail is not well supported by DNS in default 5.0-RC2 install
Date: 09 Jan 2003 16:45:02 -0800

 Peter Pentchev <roam@ringlet.net> writes:
 
 > What does your /etc/resolv.conf file contain?
 
 I use basic dhclient, so I get:
 
     search attbi.com
     nameserver 204.127.198.4
     nameserver 63.240.76.4
 
 If you care to, you can find more discussion about this in -current
 3-4'Jan'03 with this string in subject:
  "5.0-RC2 informal PR: 90 sec sendmail"
 
 I understood Terry Lambert to agree that there was a problem in the
 resolver or that a DNS server must be running and configured to do
 reverse resolution on localhost for both IPv4 & IPv6.
 
 Terry knew I used DHCP, but I think neither of us thought about
 resolv.conf.  My /etc/dhclient.conf is empty.  Are you thinking it
 should have something like "prepend search localhost"?  I'd still
 wonder why it worked without IPv6 in my kernel.
State-Changed-From-To: open->analyzed 
State-Changed-By: gshapiro 
State-Changed-When: Sat Feb 8 11:47:48 PST 2003 
State-Changed-Why:  
This is fixed in sendmail 8.12.7: 

CONFIG: Use FEATURE(`msp', `[127.0.0.1]') in submit.mc by default 
to avoid problems with hostname resolution for localhost 
which on many systems does not resolve to 127.0.0.1 (or 
::1 for IPv6).  If you do not use IPv4 but only IPv6 then 
you need to change submit.mc accordingly, see the comment 
in the file itself. 

Note that 8.12.6 is currently in the FreeBSD source tree.  8.12.8 is 
due out soon and will imported upon it's release.  Once that is done, 
this bug will be fixed. 


Responsible-Changed-From-To: freebsd-bugs->gshapiro 
Responsible-Changed-By: gshapiro 
Responsible-Changed-When: Sat Feb 8 11:47:48 PST 2003 
Responsible-Changed-Why:  
Over to sendmail maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46873 
State-Changed-From-To: analyzed->patched 
State-Changed-By: gshapiro 
State-Changed-When: Sat Feb 8 12:42:10 PST 2003 
State-Changed-Why:  
I changed my mind and imported sendmail 8.12.7 into -CURRENT.  It fixes 
this problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46873 
State-Changed-From-To: patched->closed 
State-Changed-By: gshapiro 
State-Changed-When: Mon Feb 17 11:14:54 PST 2003 
State-Changed-Why:  
sendmail 8.12.7 has been MFC'ed to RELENG_4. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46873 
>Unformatted:
