[comp.mail.sendmail] need help with MX records

sidney@borland.com (Sidney Markowitz) (03/20/91)

We're running Sun OS 4.1.1 on a Sun 4 (Sparc), using the domain name
server and sendmail.mx software supplied by Sun. Our site has an IP
address on the Internet. For some reason mail addressed to hosts that
are not on the Internet, but are reached via MX records, bounces with a
an error about the host name not being found. I added the resolver
software to the shareable library, and that has to be working because
we can access sites on the Internet and the only way for sendmail to
get their address is through the domain name service (We are not
running the Yellow Pages).

I tried ftp'ing sendmail-5.65b+IDA, and sendmail-5.65 from
uxc.cso.uiuc.edu and building them. They seem to require a newer Bind.
I got that, and was able to build and run named, with no change in
results. But that version's gethostnamadr.c doesn't seem to compile ok
as position-independent code, so I can't put the new resolv lib in the
shareable library, sendmail 5.65 gets errors when I try to build it,
and sendmail 5.65b+IDA builds but doesn't run.

Before I put a whole lot more effort into this, does anyone have any
advice about how to get the MX records to be handled by the standard
domain name server and sendmail.mx, or how to get gethostnamadr.c into
a shareable lib, or how to build sendmail 5.65 for a Sun OS 4.1.1, or
any other way of making this work?

Thanks in advance.

 -- sidney markowitz <sidney@borland.com>

rickert@mp.cs.niu.edu (Neil Rickert) (03/20/91)

In article <1991Mar20.002804.2705@borland.com> sidney@borland.com (Sidney Markowitz) writes:
>We're running Sun OS 4.1.1 on a Sun 4 (Sparc), using the domain name
>server and sendmail.mx software supplied by Sun. Our site has an IP
>address on the Internet. For some reason mail addressed to hosts that
>are not on the Internet, but are reached via MX records, bounces with a
>an error about the host name not being found. I added the resolver

 I have used sendmail.mx on a Sparc with no difficulty.  But you have to use
sendmail.mx.  You cannot use sendmail.nomx even if the resolver code is in
the shared library.

 I have seen your problem before.  It is usually caused by not understanding
what it means to run sendmail.mx

 I recommend you do the following:

	cd	/usr/lib
	mv 	sendmail	sendmail.nomx
	ln	sendmail.mx	sendmail

I don't know why Sun doesn't distribute their systems with both a
'sendmail.mx' and a 'sendmail.nomx', with one of them linked to sendmail.
(Please Sun, would you consider doing it this way in future.  Maybe even use
a symbolic link instead of a hard link.  Most sysadmin's are not sendmail
guru's and are very hesitant to move files around.  Put them in the right
place to start, so that it is easy to understand.)

 It is NOT ENOUGH to start 'sendmail.mx' as the daemon from /etc/rc*.
The actual binary /usr/lib/sendmail in use MUST BE sendmail.mx if you
want this to work.  Most outgoing mail uses /usr/lib/sendmail, while
incoming mail uses the daemon.  It is for the outgoing mail that you need
sendmail.mx

>I tried ftp'ing sendmail-5.65b+IDA, and sendmail-5.65 from
>uxc.cso.uiuc.edu and building them. They seem to require a newer Bind.
>I got that, and was able to build and run named, with no change in
>results. But that version's gethostnamadr.c doesn't seem to compile ok
>as position-independent code, so I can't put the new resolv lib in the
>shareable library, sendmail 5.65 gets errors when I try to build it,
>and sendmail 5.65b+IDA builds but doesn't run.

 You should be able to build sendmail-5.65+IDA using Sun's libresolv.a.

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

kucharsk@Solbourne.COM (William Kucharski) (03/21/91)

In article <1991Mar20.035906.30388@mp.cs.niu.edu> rickert@mp.cs.niu.edu (Neil Rickert) writes:
 >In article <1991Mar20.002804.2705@borland.com> sidney@borland.com (Sidney Markowitz) writes:
 >>We're running Sun OS 4.1.1 on a Sun 4 (Sparc), using the domain name
 >>server and sendmail.mx software supplied by Sun. Our site has an IP
 >>address on the Internet. For some reason mail addressed to hosts that
 >>are not on the Internet, but are reached via MX records, bounces with a
 >>an error about the host name not being found. I added the resolver
 >
 > I have used sendmail.mx on a Sparc with no difficulty.  But you have to use
 >sendmail.mx.  You cannot use sendmail.nomx even if the resolver code is in
 >the shared library.
 >
 > I have seen your problem before.  It is usually caused by not understanding
 >what it means to run sendmail.mx...

One other thing which I've seen happen may or may not be fixed in 4.1.1 but was
broken in 4.1.  Under 4.1, if you have a local wildcard MX record, mail to any
host which has an MX record but is not directly connected to the internet will
bounce.  Here's what 4.1's sendmail.mx does:

If there's a wildcard MX for your domain (say "foo.com"), sendmail.mx will
attempt to lookup hosts as name.domain, e.g. it will attempt to lookup the
host "bar.com" as "bar.com.foo.com."  It will attempt to lookup both MX and A
records for that host.  Since it finds a MX record due to the wildcarding, it
will attempt to lookup an A record, but won't find one (naturally).

It will then attempt to lookup an A record for "bar.com," and if it doesn't find
one it will declare the host unknown.  It WILL NOT attempt to lookup a MX
record for "bar.com"!

The 4.0.3 sendmail.mx and sendmail5.65 handle this situation correctly.

-- 
| William Kucharski, Solbourne Computer, Inc.     | Opinions expressed above
| Internet:   kucharsk@Solbourne.COM	          | are MINE alone, not those
| uucp:	...!{boulder,sun,uunet}!stan!kucharsk     | of Solbourne...
| Snail Mail: 1900 Pike Road, Longmont, CO  80501 | "It's Night 9 With D2 Dave!"

sidney@borland.com (Sidney Markowitz) (03/22/91)

kucharsk@Solbourne.COM (William Kucharski) writes:
> Under 4.1, if you have a local wildcard MX record, mail to any
>host which has an MX record but is not directly connected to the internet
>will bounce.

That describes our situation and the symptoms exactly. Of course the
sysadmin manual uses a local wildcard MX record in an example :-(. I
just deleted the wildcard MX record, since sendmail.cf on the mailhost
converts the host name from the from line anyway, so no one should
ever see the host names in the domain. Thank you, and to everyone else
who provided suggestions.

 -- sidney markowitz <sidney@borland.com>

rickert@mp.cs.niu.edu (Neil Rickert) (03/22/91)

In article <1991Mar21.192352.6777@borland.com> sidney@borland.com (Sidney Markowitz) writes:
>That describes our situation and the symptoms exactly. Of course the

  Actually, it doesn't matter whether this is the explanation or not.  It
doesn't matter what you do with MX records.  You don't even need to run
sendmail.  For the fact is, NOBODY can get mail to you anyway.  Your mail
system is totally broken.  All mail bounces with an error message indicating
a bad status code from /bin/mail.

  I did report this to your Postmaster, who seems to have a mailbox on MCIMAIL.
I don't know whether he reads that mailbox, but the problem is still there.

  Check the permissions on /bin/mail.  It must be owned by root, and
you must chmod u+s /bin/mail

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