----- Original Message -----
From: "Harmeet Bedi" <[EMAIL PROTECTED]>


> DNSServer block returs a sorted collection now and has been from the first
> instance of the block. One could loose ordering in a collection but
> converting to list does not help as list is a collection. Iterator may be
> the best to express the idea of order.

err, a Collection is unordered, and a List is an *ordered* Collection.  Yes,
a List is a Collection, differentiated by the exact attribute we want...
ordering.  An Iterator would restrict how you could use the result.

> Sorting is the responsibility of DNSServer implementation not the user of
> API. The collection returns MX Records sorted by priority. Remote Delivery
> gets hold of and collection through mailet context(o.a.j.James), converts
to
> an iterator and attempts to send email to the first mail server address
than
> second if first fails and so on. The only 2 methods called on Collection
are
> Collection::size and Collection::iterator.

Right, and on a Collection, iterator is not guaranteeing an order.

> Converting to a List will not really help as the returned collection/list
> contains only contains the IP address. There is not enough context like
> priority in the returned collection/list to allow the user of the API to
> effectively sort on.

The DNS server needs to return the List... it *will* know the correct order
to put the IP addresses in.  Yes, we cannot later convert it to a List and
expect it to create an order, which I why I think the DNS server should
return a List.  If it is already, that's great.

>     /**
>      * Returns a Collection of Strings of hostnames or ip addresses that
>      * are specified as mail server listeners for the given hostname.
>      * This is done using MX records, and the hostnames or ip addresses
>      * are returned sorted by MX priority.
>      *
>      * @param host - the domain name for which to find mail servers
>      * @return a Collection of Strings of hostnames, sorted by priority
>      */
>     Collection getMailServers(String host);

Yes ok, so this should be changed... getMailServers(String host) should
return a List because those IP addresses should be ordered by the underlying
implementation.

> > I thought there was a conf option for whether to do authoritative
lookups,
> > no?
>
> Yes it does and it seems good to have the config option.
> The default is false and that is probably the better option. I am not
> suggesting the config option should be removed but curious if folks ever
> change the authoritative lookup setting.

Ok, so we're leaving it as is?

Serge Knystautas
Loki Technologies
http://www.lokitech.com/


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to