how to obtain MX records for a domain
Barry Margolin
barmar at alum.mit.edu
Mon Jul 11 19:24:37 UTC 2005
In article <daubaj$dqm$1 at sf1.isc.org>, frank at nfurter.spam wrote:
> On Fri, 10 Jun 2005 21:09:07 -0400, Barry Margolin
> <barmar at alum.mit.edu> wrote:
>
> >> I want to obtain MX records for a domain, just as host.c does it. Is
> >> there a less sophisticated example using dns_resolver functions,
> >> because host.c / dighost.c apparently are not to be used as an
> >> example, and they are more sophisticated than I require. Thanks.
> >
> >I think the chapter on using the resolver library in the DNS & BIND book
> >has an example of doing precisely this.
>
> I have looked through every page of the DNS+BIND book, particularly
> the chapter on resolver programming Ch 15, and I cannot find any
> example to obtain MX records for a domain. Ch 15 gives as an example
> getting SOA records or some such, which appears irrelevant.
Sorry, my memory was not that detailed. I remembered that there was an
example in the book, I didn't remember specifically what type of record
it looks for.
> It would be very convenient to have a short example to do this.... can
> you tell me if I am wrong, or if there is an example in some other
> source?
How hard is it to replace SOA with MX in the example? Also, you'll
probably want to use a recursive query -- the example in that chapter is
non-recursive.
--
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
More information about the bind-users
mailing list