[comp.mail.sendmail] Problem with sendmail 5.65 with unqualified names

ellozy@farber.harvard.edu (Mohamed Ellozy) (06/25/91)

I am trying to upgrade to sendmail 5.65 with the Berkeley config files
(I have been using a homebrew config file that has fallen behind the
times).

The host I am testing on is in the dfci.harvard.edu subdomain, and must
be able to send mail to user@host when host is in the upper level
harvard.edu domain.  Must means that users require it.

Though I am running Ultrix 4.1, I have compiled sendmail with the 4.8.3
resolver library.  In my /etc/resolv.conf I have search set to:

	search dfci.harvard.edu harvard.edu other.do.main

So for mail to user@host the resolver should first try
host.dfci.harvard.edu and, if that fails, host.harvard.edu, then
host.other.do.main.

This seems to work well with one exception.  When I send mail to a host
in the harvard.edu domain, using the unqualified name, mail gets
delivered fine, and all seems to indicate that it was correctly
processed.  Specifically, sendmail -bt shows user@host being resolved
to user@host.harvard.edu.  The sendmail dialogue (mail -v) shows a
correct address.  The message, however, has a header of:

	To: user@host.dfci.harvard.edu.

The same occurrs with the cc: line.  That suggests that in some place
the domain name is being appended to the unqualified host name, rather
than calling the resolver to canonicalize.  I cannot find any place
where $D is appended whithout a previous attempt (usually two lines
higher) to use the resolver.  It happens every time, so cannot be a
temporary slow name server response.

Any help will be much appreciated.

Mohamed

rickert@mp.cs.niu.edu (Neil Rickert) (06/25/91)

In article <1991Jun24.231248.305@Think.COM> ellozy@farber.harvard.edu (Mohamed Ellozy) writes:
>
>This seems to work well with one exception.  When I send mail to a host
>in the harvard.edu domain, using the unqualified name, mail gets
>delivered fine, and all seems to indicate that it was correctly
>processed.  Specifically, sendmail -bt shows user@host being resolved
>to user@host.harvard.edu.  The sendmail dialogue (mail -v) shows a
>correct address.  The message, however, has a header of:
>
>	To: user@host.dfci.harvard.edu.
>
  This is a bug in the Berkeley sendmail.  It was reported last October.
When the mailer is called, and a connection is made, the TCP mailer should
already have a fully qualified host name.  Code in deliver.c turns off all
local domain qualification while looking up the MX record and associated
address.  Unfortunately, it turns it on again too late, so that during the
processing of header addresses the local domain qualification is still
turned off.

  The problem is corrected in the IDA versions, with a change to daemon.c.
You could probably extract a patch from the RCS archives, but it is probably
entangled with other patches.  Of course you could just use the IDA versions
and use a dbm domaintable lookup for a more reliable approach to local
qualification.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

ellozy@farber.dfci.harvard.edu (Mohamed Ellozy) (06/26/91)

In article <1991Jun25.023129.827@mp.cs.niu.edu> rickert@mp.cs.niu.edu (Neil Rickert) writes:

Summarizes my problem with sendmail adding $D to unqualified host names
in the To: and Cc: lines, even when a domain lookup would have given a
different domain.

>  This is a bug in the Berkeley sendmail.  It was reported last October.

Then he describes the bug.

>  The problem is corrected in the IDA versions, with a change to daemon.c.
>You could probably extract a patch from the RCS archives, but it is probably
>entangled with other patches.  Of course you could just use the IDA versions
>and use a dbm domaintable lookup for a more reliable approach to local
>qualification.

Has anyone fixed the bug in plain sendmail?  I know that I will soon need
to learn all about IDA, but right now I want to be able to run a better
plain sendmail.

How simple is it to go from a standard sendmail to IDA?  If it is easy enough
I might do it.  I am using Ultrix and I believe the IDA I need is the one
from UIUC?

Thanks.

Mohamed

rickert@mp.cs.niu.edu (Neil Rickert) (06/26/91)

In article <1991Jun25.212656.19800@Think.COM> ellozy@farber.dfci.harvard.edu (Mohamed Ellozy) writes:
>In article <1991Jun25.023129.827@mp.cs.niu.edu> rickert@mp.cs.niu.edu (Neil Rickert) writes:
>>  This is a bug in the Berkeley sendmail.  It was reported last October.
>
>Has anyone fixed the bug in plain sendmail?  I know that I will soon need
>to learn all about IDA, but right now I want to be able to run a better
>plain sendmail.

  I believe the bug was reported to Berkeley at the same time it was posted
here.  They have not released 5.66.  With a little work you could extract the
patch from IDA sources and apply it to Berkeley sources.

>How simple is it to go from a standard sendmail to IDA?  If it is easy enough
>I might do it.  I am using Ultrix and I believe the IDA I need is the one
>from UIUC?

  You should normally be able to use the IDA binary with a Berkeley config
without problem.  However this alone won't completely solve your problem.
The IDA version will qualify in your domain, but not in parent domains, as
it disables RES_DNSRCH.  This is done for good reasons which have from
time to time been discussed in this newsgroup, but which are probably not
adequately documented in the IDA package.  If you use the IDA config you
can use a dbm table to selectively qualify however you wish.


-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940