how to obtain MX records for a domain

frank at nfurter.spam frank at nfurter.spam
Sat Jul 9 18:45:14 UTC 2005


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.

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?



More information about the bind-users mailing list