Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rochester!pt!sei!sei.cmu.edu!pdb From: pdb@sei.cmu.edu (Patrick Barron) Newsgroups: comp.mail.misc Subject: Re: MX records Message-ID: <2017@aw.sei.cmu.edu> Date: Mon, 27-Jul-87 20:41:02 EDT Article-I.D.: aw.2017 Posted: Mon Jul 27 20:41:02 1987 Date-Received: Wed, 29-Jul-87 00:53:49 EDT References: <801@hao.UCAR.EDU> Sender: netnews@sei.cmu.edu Reply-To: pdb@sei.cmu.edu (Pat Barron Organization: Carnegie-Mellon University, SEI, Pgh, Pa Lines: 53 Keywords: what are they? In article <801@hao.UCAR.EDU> woods@hao.UCAR.EDU (Greg Woods) writes: >Now that we have a running named(8) name server, and a version of sendmail(8) >capable of querying it, I'd like to make use of it. I hear a lot about MX >records, but as yet I have not figured out exactly what they are nor how to >use them. The BIND documentation mentions their existence and how to specify >them in the named cache files, but it does not explain how they would be used. >The sendmail documentation I have doesn't mention them at all. So, can someone >answer these questions for me (and I doubt if I'm the only one that wants to >ask): 1) What exactly is the purpose of an MX record? 2) How do I go about >using one at this site to make delivery to our domain more reliable? 3) How >do I use the MX records provided by other sites? An MX record simply specifies the name of another site that can accept mail addressed to your site, along with a preference value that specifies what order to try mail exchangers if there are more than one. For instance, the host "watnot.waterloo.edu" is a CSnet site, but I'd still like to be able to mail to "user@watnot.waterloo.edu", instead of "user%watnot.waterloo.edu@relay.cs.net" (in other words, I'd rather not know or care that this mail must go through CSNET-RELAY.) The "nslookup" program (which you should have gotten with BIND) can be set to look at MX records by "set querytype=MX". When I do this, and look up watnot, I get: watnot.waterloo.edu preference = 10, mail exchanger = relay.cs.net Which means that all mail to watnot.waterloo.edu should *really* be sent to relay.cs.net. Note that the preference value here is meaningless, since there is only one MX record. Another more interesting case is the site "cis.upenn.edu", which is on the Internet. Here are the MX record lookups for that site: cis.upenn.edu preference = 10, mail exchanger = E.CIS.UPENN.EDU cis.upenn.edu preference = 10, mail exchanger = B.CIS.UPENN.EDU cis.upenn.edu preference = 10, mail exchanger = C.CIS.UPENN.EDU cis.upenn.edu preference = 20, mail exchanger = CIS.UPENN.EDU cis.upenn.edu preference = 30, mail exchanger = LINC.CIS.UPENN.EDU Here, there are 5 machines specified as able to recieve mail for "cis.upenn.edu", and one of them is that machine itself. Since there are multiple MX records, the mailer should try them in order of ascending preference value; first it tries all of "E...", "B...", and "C...", in no particular order. If all of those fail, it will try to send to "CIS.UPENN.EDU" directly. If *that* fails, then it tries to send the mail to "LINC.CIS.UPENN.EDU". Note that, when delivering mail to an MX host, the "To:" address in the header is *not* rewritten to include the name of the MX host. The MX host must be smart enough to gateway mail (this is quite easy for sendmail to do). --Pat.