Resolving MX records

Barry Margolin barmar at genuity.net
Wed Jan 2 23:24:51 UTC 2002


In article <a103tv$37o at pub3.rc.vix.com>, webs-uk.com <neil at webs-uk.com> wrote:
>Hi,
>
>I am trying to write an email sender in Java. I have worked out that I need
>to get the MX info for the destination so that I can conect to the SMTP
>server.
>
>I have looked at several RFCs such as RFC883. and others and have worked out
>that I can send a datagramme to a DNS to query it for the MXinfo.
>
>The RFC papers are not easy to read and I have not been able to work out how
>to format the datagramme properly.
>
>Have you seen any books that cover this in sufficient detail? would you
>recommend any books? Does anyone have an example in C, C++  or java of the
>code I need to use?

The DNS & BIND book has an appendix that shows how to use the Resolver
library from C.  You can use that to query for any record type.

-- 
Barry Margolin, barmar at genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list