From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9ba4,7f6b6a63c3a66c91,start X-Google-Attributes: gidf9ba4,public X-Google-Thread: fe4ef,7f6b6a63c3a66c91,start X-Google-Attributes: gidfe4ef,public X-Google-Thread: f678f,7f6b6a63c3a66c91,start X-Google-Attributes: gidf678f,public X-Google-Thread: fcda7,7f6b6a63c3a66c91,start X-Google-Attributes: gidfcda7,public X-Google-Thread: 10de99,7f6b6a63c3a66c91,start X-Google-Attributes: gid10de99,public X-Google-ArrivalTime: 1995-03-25 04:47:00 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!zib-berlin.de!news.mathworks.com!uunet!in1.uu.net!news.uiowa.edu!icaen!dbfunk From: dbfunk@icaen.uiowa.edu (David B Funk) Newsgroups: comp.protocols.tcp-ip.domains,comp.mail.sendmail,comp.soft-sys.dce,comp.unix.osf.misc,comp.sys.hp.hpux Subject: BIND RR compatability problem, exacerbated by sendmail, triggered by DCE config. Date: 25 Mar 1995 11:20:35 GMT Organization: Iowa Computer Aided Engineering Network, University of Iowa Distribution: world Message-ID: <3l0ua3$75e@news.icaen.uiowa.edu> NNTP-Posting-Host: is0.icaen.uiowa.edu Summary: new RRs can cause problems with old nameservers and sendmail. Keywords: BIND DNS sendmail DCE Xref: nntp.gmd.de comp.protocols.tcp-ip.domains:4530 comp.mail.sendmail:14220 comp.soft-sys.dce:568 comp.unix.osf.misc:2474 comp.sys.hp.hpux:22343 I think that I've found a strange compatability problem between different versions of BIND, which is exacerbated by sendmail, that can cause mail delivery problems. The conditions necessary for this problem to occur can be created by some types of DCE configurations, but could be created by other system configurations, as well. When named is processing a query response packet that contains multiple types of RRs, it will terminate the processing as soon as it comes accross a RR that it doen't recognise and discard any further RR data in the packet. It will only see multiple types of RRs in a response if the initial type of query was a 'T_ANY', unfortunately newer versions of sendmail start off their DNS processing with this type. The fallout from this occurs when the nameserver caches this partial answer and then proceeds to answer further queries with it as if it had all the info. Here is an example that will illustrate the problem: Suppose we have two nameservers: "A" which is BIND-4.9.3 and "B" which is BIND-4.8.3. As part of processing a mail message, "B" sends a 'T_ANY' query to "A", and "A" replies with a packet that contains the following sequence of RRs for the zone-name in question: 1) A(1) 2) MX(1) 3) NS(1) 4) NS(2) 5) SOA(1) 6) TXT(1) 7) AFSDB(1) 8) MX(2) 9) MX(3) When "B" receives this packet, it will start processing it, validating and storing the RRs until it hits #7, thereupon it will stop as it doesn't recognise 'T_AFSDB' so it will drop that RR, -and- #8 & #9. Then when the sendmail daemon on "B" makes a query with type=T_MX, the nameserver on "B" will reply with an answer of only 'MX(1)', totally missing the fact that there are 2 other MX records for the zone-name in quesiton. What causes the mail delivery problem is the fact that 'MX(1)' is a "bogus" MX, not valid for mail delivery, that 'MX(2)' and 'MX(3)' are the ones necessary for mail delivery. (For a detailed explanation of why I have this configuration, see the footnote at the end of this post, it's related to DCE ;). I've observed this behavior in BIND-v4.8.3 thru BIND-v4.9.3-BETA17, so I'm assuming that they all do it. The problem is triggered by the order that the RRs appear in a packet. This appears to be based upon the way that the server stores things in memory, which seems random, making the problem intermittent and hard to pin down. ;{ There might be something wrong with my DNS configuration but I don't think so. I've looked at all the things that I know to check and even built a few special test servers to check out my theories. If anybody can tell me what I've missed, I'll be happy for the critique. ;) Questions to the BIND folks: Why does named terminate processing on unrecognised RRs? Couldn't it just skip over them? Could named put the RRs in a 'T_ANY' reply in sorted order based upon the type value? Then if the recipient was an older verison of bind, it would first see all the RRs that it knew how to deal with and only discard unrecognised data. Question to the sendmail folks: Would it be possible to skip the initial 'T_ANY' query and go directly to the 'T_MX' or 'T_A's? If the first query were 'T_MX' then only the recognised data would be returned and this problem would be side-stepped. Comment for the DCE folks: Could you please document this condition so as to warn people about the hazard of using both AFSDB and MX records at the same time. (*) The 'DCE reason' for the strange MX records: A DCE cell uses a global directory agent (GDA) to locate objects stored in other DCE cells. When using the internet domain naming convention for a cell name, there are a particular set of DNS RRs needed for one GDA to locate the CDS in another cell. This consists of TXT records containing the UUID of the cell root directory clearinghouse and other records that 'point' to the host that is running the CDSD. The proper 'poiner' is an AFSDB RR, but to provide compatability with cells that are running older versions of named that don't know how to deal with AFSDB records, it is also possible to use an MX record for this 'pointer'. Thus a cell/zone-name may have MX records that have nothing to do with mail but just alternate methods to implement DCE intercell communications. The usual convention is to set these critters up with a large 'preference' value so that sendmail will ignore them. However in the formentioned situation, it is possible for a remote sendmail to only see these DCE 'pointer' MX records. At our site, the DCE CDS node was not running sendmail in "daemon" mode, thus not listening for remote incoming mail. I only became aware of the problem while helping with a host in another department and noticed mail addressed to ours occasionally backing up on their mailserver. Here's a listing of the DNS zone-data for our DCE cell: ; @ IN SOA icaen6.icaen.uiowa.edu. dbfunk.icaen.uiowa.edu. ( 941028 ; Serial 10800 ; Refresh 3 hours 3600 ; Retry 1 hour 360000 ; Expire 100 hours 21600 ) ; Minimum 6 hours ; IN NS icaen6.icaen.uiowa.edu. IN NS icaen7.icaen.uiowa.edu. IN NS dns1.uiowa.edu. IN NS dns2.uiowa.edu. IN NS dns3.uiowa.edu. IN A 128.255.21.56 IN A 128.255.16.56 IN MX 10 icaen6.icaen.uiowa.edu. IN MX 20 ns-mx.uiowa.edu. ; ; Stuff to support our DCE cell ; IN MX 200 server04.icaen.uiowa.edu. IN MX 210 s-dce01.icaen.uiowa.edu. IN AFSDB 2 server04.icaen.uiowa.edu. IN AFSDB 2 s-dce01.icaen.uiowa.edu. IN TXT "1 16aecfdc-6c94-11cd-85d3-080009176ac6 Master /.../icaen.uiowa.edu/server04_ch 15aa7a00-6c94-11cd-85d3-080009176ac6 server04.icaen.uiowa.edu" IN TXT "1 16aecfdc-6c94-11cd-85d3-080009176ac6 Readonly /.../icaen.uiowa.edu/s-dce01_ch db925088-635d-11ce-af1b-080009706cbc s-dce01.icaen.uiowa.edu" ; -- Dave Funk Sys-admin/News-admin/Postmaster for ICAEN Better is not better, 'standard' is better. B{ #include