Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!uwm.edu!archimedes.math.uwm.edu!jgreco From: jgreco@archimedes.math.uwm.edu (Joe Greco) Newsgroups: comp.mail.sendmail Subject: Re: MX records, NAMED_BIND, and aliases in /etc/hosts Message-ID: <5229@uwm.edu> Date: 22 Jul 90 02:36:08 GMT References: <2850@dftsrv.gsfc.nasa.gov> Sender: news@uwm.edu Distribution: na Organization: University of Wisconsin, Milwaukee - Department of Mathematics Lines: 69 In comp.mail.sendmail article <2850@dftsrv.gsfc.nasa.gov>, jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) wrote: :I've been working on a port of 5.64 to A/UX... the port is pretty straight- :forward, but there is one area where I'm stuck. Any help would be great. : :It seems when sendmail is compiled with NAMED_BIND defined, then nameserver :support is incorporated. This is fine. However, sendmail will then refuse :to use or recognize any and all aliases in /etc/hosts. For example, if a :line in /etc/host is: The nameserver is a complete replacement for /etc/hosts, which might be used at best for initial lookups for the nameserver. Locally, we specify addresses to the nameserver, so I don't think /etc/hosts is even necessary. Therefore you can put whatever you want in /etc/hosts and it won't do a darn thing. :and one tries to mail to foo@tryme, then the mail gets bounced back with :the "host unknown" error. This is done whether the RES_* options are :in the source or commented out, so I don't think it's resolver, but I may :be wrong. : :However, when sendmail is compiled without NAMED_BIND defined, then the :aliases are recognized and used. It still lets me mail stuff to hosts :NOT specified in /etc/hosts, so some nameserver functionality is maintained. As I recall, NAMED_BIND is mainly used to tell sendmail to do MX lookups. Your C library should still have the nameserver installed and running, so it should perform host name lookups via BIND but not MX lookups. This means you can mail to a host for which there is an A record but not to hosts for which there are only MX records. :The upshot is, I need to be able to use/query MX records (and therefore :NAMED_BIND must be defined) but I also would like to be able to use aliases :in /etc/hosts (after all, they are recognized in telnet, ftp, etc...). It is probably Not Really True that they are recognized in telnet, ftp, etc. I'd guess if that you recompiled those clients to support name server, the aliases would suddenly cease to function. This is probably the desirable action, anyways, as it would be a real drag having to trace down which lookup method was producing the wrong answers. Remember, with UNIX, library routines are included in program binaries. If you compile a program with a host-table library routine as opposed to a nameserver library routine, it'll use the host table until it is blue in the face (and you are quite red with fury). You have to recompile the puppy. We've currently got a little of both on this machine, and Monday I intend to replace every single piece of code with nameserver calls in it. :-) One of my gripes with the host table routines is that sometimes they don't catch aliases correctly. :-| Now, back to the subject. It occurs to me that maybe you don't entirely understand MX records (or perhaps CNAME records), since it would be possible to implement aliasing in either of these fashions. Personally, I prefer CNAME because then you may use telnet, finger, ftp, etc with the same nickname. Users like consistency. However, I believe the aliasing you desire can be performed either way. ... Joe Informational Content Disclaimer: I've just spent a few weeks wrestling with DNS and named. I believe my facts are correct. My sendmail experience is a little shakier. I still believe my facts are correct. Your mileage may vary. ------------------------------------------------------------------------------- Joe Greco - University of Wisconsin, Milwaukee - Department of Mathematics jgreco@archimedes.math.uwm.edu USnail: Joe Greco Voice: 414/321-6184 9905 W. Montana Ave. Data: 414/321-9287 (Happy Hacker's BBS) West Allis, WI 53227-3329 #include Disclaimer: I don't speak for the Math Department, the University, or myself.