Resolver resolver = (this.nameserver==null) ? new SimpleResolver() : new SimpleResolver(this.nameserver);
// try to lookup the MX records
Lookup lookup = new Lookup(atHost,Type.MX);
lookup.setResolver(resolver);
lookup.run();
Record[] records = lookup.getAnswers();
if ( records == null ) {
// in the event there are no MX records, then punt and try to find A record
Lookup lookup2 = new Lookup(atHost,Type.A);
lookup2.setResolver(resolver);