Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!uwvax!oddjob!matt From: matt@oddjob.UChicago.EDU (Matt Crawford) Newsgroups: comp.mail.misc Subject: Re: MX records Message-ID: <13919@oddjob.UChicago.EDU> Date: Sun, 2-Aug-87 20:33:34 EDT Article-I.D.: oddjob.13919 Posted: Sun Aug 2 20:33:34 1987 Date-Received: Sun, 2-Aug-87 23:50:59 EDT References: <801@hao.UCAR.EDU> <2017@aw.sei.cmu.edu> Reply-To: matt@oddjob.uchicago.edu (I am not a Grook) Organization: Morse Science High School Lines: 60 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. And pdb@sei.cmu.edu (Pat Barron) says: >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. Let me elaborate a little on what Pat said. Let's say that an MX-using host S is trying to send mail to a destination D. It finds all the MX records for D. If none of these name D itself as a mail-exchanger for D, then S will not attempt to connect to D directly. If S itself is listed as a mail-exchanger for D, with some preference P, then S will only connect to a mail exchanger whose preference is strictly less than P. If that last rule leaves no eligible mail-exchangers for D (or if there were no MX records to begin with), then S may (must?) pretend that there was an MX record listing D as a mail-exchanger with preference zero. Not that you don't need to do anything funky in sendmail.cf to use the MX records. If ruleset zero resolves to host D, then code in deliver.c will look up MX records for D. Now for two named caveat and some cute tricks. It is awfully tempting to put a wildcard MX record in the data for your domain. This is usually not as useful as you think. Wildcard records are only returned to a querant if there is no other record of any type for the name asked about. If the mail-exchanger listed for some host is itself a nickname for something, that is if it is the subject of a CNAME record, you may create a forwarding loop. Here at the university of Chicago we have a high speed but unreliable internet connection, and a lower speed connection. We list the host which owns the low speed connection as an MX with preference 100 for every mail host in our domain. That host is "dumb" and always forwards internal mail to another host, gargoyle, so to avoid loops we must list gargoyle as an MX for every host and give it a lower preference. Thus a typical host's MX records look like: chip.UChicago.EDU preference = 0, mail exchanger = chip.UChicago.EDU chip.UChicago.EDU preference = 10, mail exchanger = sphinx.UChicago.EDU chip.UChicago.EDU preference = 99, mail exchanger = gargoyle.UChicago.EDU chip.UChicago.EDU preference = 100, mail exchanger = cypress.UChicago.EDU When our primary link is down, only host cypress.UChicago.EDU is reachable from off-campus. Thus mail from MX-using hosts will still get in. (Yes, we do have an off-campus secondary server for our domain!) ________________________________________________________ Matt University matt@oddjob.uchicago.edu Crawford of Chicago {astrovax,ihnp4}!oddjob!matt