From: Brian W. <bwe...@xb...> - 2007-07-18 09:06:44
|
On Wed, 18 Jul 2007, Stefano Bagnara wrote: > Brian Wellington ha scritto: >>> We use dnsjava to lookup MX records for SMTP delivery: what do you think >>> is the behavior required by DNS+SMTP specification? Currently we simply >>> run the Lookup using the dnsservers configured by the user (or the one >>> autodiscovered by dnsjava) and take its result as is. In this >>> "uudial.ch." domain and 194.246.118.118 configuration the dnsjava >>> "Lookup" does not return the MX record: is this intended? Should we do >>> something different? Can you answer this or give me a pointer to some >>> doc I can read about? >> >> I don't know what 194.246.118.118 is, but when I query it, it's not >> doing recursion. dnsjava's Lookup class is a stub resolver, so it >> should only be sending queries to servers that perform recursion. If I >> instead send the query to a server that does perform recursion, I get >> the desired MX record. > > Maybe I'm confusing iterative vs recursive terms. > > I tried googling this but I didn't find an answer: > > is a server allowed to reply non-recursively to a recursive question? Yes. There is no such thing as a recursive question - there is a question where recursion is desired. There's no way to require recursion. > what does a client should (have to) do when a server replies without the > "ra" flag? There's nothing a client can do. A client which is incapable of performing recursion itself should not be configured to point at servers which do not perform recursion. Anything else is a configuration error on the client. > Should we keep resolving the data to the NS server received? > > If so, can you suggest an approach to the problem using dnsjava? Continuing the resolution would be the correct thing to do if you were writing a name server. From the context of a client wishing to lookup MX records, I believe the right thing to do is simply fail. > Would this behavior be defined "iterative" resolution or iterative vs > recursive both describe only server side resolution? I'm not really sure how iterative resolution would differ from recursive resolution. There are basically two kinds of resolvers - full resolvers and stub resolvers. A full resolver would use the complete resolution algorithm, talking to authoritative name servers and following NS records. A stub resolver would ask a full resolver to do the recursion for it. Pretty much every client application uses a stub resolver. It's possible to have a full resolver that's not part of a caching name server, but I don't know of any. > What do other other clients do wrt non recursive servers? They would generally fail to perform the desired lookups. Brian |