[ajug-members] DNS APIs
Christopher Fowler
cfowler at outpostsentinel.com
Fri Aug 4 10:27:00 EDT 2006
Paul,
I appreciate the link. I'll try it out. I'm just trying to keep from
reinventing the wheel :)
On Fri, 2006-08-04 at 10:09, Paul Bemowski wrote:
> I've used this, and it works great:
> http://www.dnsjava.org/index.html
>
> I start with something like this:
> /** */
> static final void initializeDNS(Vector dnsservers, int timeout)
> throws MalformedURLException, UnknownHostException {
> ExtendedResolver resolver=new ExtendedResolver();
> for (int i=0; i<dnsservers.size(); i++) {
> String server=(String)dnsservers.elementAt(i);
> resolver.addResolver(new SimpleResolver(server));
> }
> resolver.setTimeout(timeout);
> dns.setResolver(resolver);
> }
>
>
> And later:
> mailExchangers=dns.getRecords(host, Type.MX);
>
> Paul
>
>
> --- Christopher Fowler <cfowler at outpostsentinel.com> wrote:
>
> > Hello,
> >
> > I need to create a program that can communicate directly with the mail
> > exchange of the domain of an email address. In order to do this I must
> > first contact the remotes DNS server or an authoritative server and
> > request for the MX record. Are their any APIs in Java that assist in
> > that?
> >
> > Thanks,
> > Chris
> >
> >
> > _______________________________________________
> > ajug-members mailing list
> > ajug-members at ajug.org
> > http://www.ajug.org/mailman/listinfo/ajug-members
> >
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
More information about the ajug-members
mailing list