james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Regarding BUG 24885: RemoteDelivery only tries one of multiple A record
Date Wed, 10 Dec 2003 22:32:32 GMT
Søren Hilmer wrote:

> Noel J. Bergman wrote:
> > Søren Hilmer wrote:
> > > rawDNSLookup needs to be called twice. I am adding a
> > > DNSServer.findARecords method to do it
> >
> > Why not use InetAddress.getAllByName(String host)?  It will get all of
the
> > IP addresses associated with the host.

> Well, that ought to work, only InetAddress uses the configured
> name service on the system, and James has its own DNS setup

I don't believe that it is necessary, but OK.

> > What do you propose for the new method signature and return type?

> I propose a method on MailetContext like:
> /**
> * This method returns a collection of addresses (A records)for the given
> * host.
> * It is guaranteed that the collection will contain at least one element.
> * @param host to lookup addresses for
> * @return collection of String's with the IP-addresses of the host.
> **/
> Collection getMailServerAddresses(String host);
> So basically it mimics the MailetContext.getMailServers(String) method.

What I don't like is that we have to call both methods, cannot deprecate the
old one, and need a nested loop to attept connections.  It seems to leave
room for people to make mistakes.  Would it not be cleaner with one call
that gave us the information we need?  In fact, why don't we just return a
custom Enumeration (or an Interator if you don't mind a remove method that
just throws UnsupportedOperationException)?  Something like:

  Enumeration|Iterator getSMTPServers(String domain);

Work for you?

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message