On Saturday 06 December 2003 00:22, Richard O. Hammer wrote:
> Noel J. Bergman wrote:
> > S�ren Hilmer wrote:
>
> ...
>
> >>>So it is handling a multihomed destination that needs to be addressed.
>
> I want to make sure I understand this issue. I've put some debugging
> statements into org.apache.james.dnsserver.DNSServer, which print out
> Record.toString() in places of interest. Today, when I call
> findMXRecords("yahoo.com"), the subsequent lookup("yahoo.com",
> Type.MX); returns the following three records, shown here before they
> are sorted for priority order.
>
> yahoo.com. 2320 IN MX 1 mx2.mail.yahoo.com.
> yahoo.com. 2320 IN MX 5 mx4.mail.yahoo.com.
> yahoo.com. 2320 IN MX 1 mx1.mail.yahoo.com.
>
> The problem being discussed here is that host mx2.mail.yahoo.com. may
> exist at several IP addresses (i.e., that a subsequent lookup of
> mx2.mail.yahoo.com. may produce several A records.)(?)
Yes, mx2.mail.yahoo.com can have sevearl A records.
>So that if, after sorting for priorities, we decide to connect to
> mx2.mail.yahoo.com. , then we need to try each of the IP addresses for
> mx2.mail.yahoo.com. before we go on to try the next host-name in our
> priority ordering (which would be mx1.mail.yahoo.com.) Is that the
> problem?
Yes, taht is the problem, now only one of the returned A-rcords for
mx2.mail.yahoo.com is tried.
>
> Do we know for sure that the JavaMail code underlying the call:
> transport = session.getTransport(urlname);
> (in method RemoteDelivery.deliver(Mail, Session)) does not do this for us?
My tests shows that JavaMail does not handle it, but I hope to be proven
wrong.
>
> Do you have an example, S�ren, of a MX host which you know has
> multiple A records, so that I can test with it?
Yes, hotmail.com returns this for is MX records:
hotmail.com. 274 IN MX 5 mx2.hotmail.com.
hotmail.com. 274 IN MX 5 mx3.hotmail.com.
hotmail.com. 274 IN MX 5 mx4.hotmail.com.
hotmail.com. 274 IN MX 5 mx1.hotmail.com.
A lookup of mx2.hotmail.com's A records get you:
mx2.hotmail.com. 3017 IN A 65.54.254.145
mx2.hotmail.com. 3017 IN A 65.54.166.230
mx2.hotmail.com. 3017 IN A 65.54.252.230
>
> > The return is a Collection of String objects. Each one is currently of
> > the form "host", but if we were to handle multi-homed hosts by using
> > "host/IP", it seems to me that we could either parse it directly ...
>
> I guess this may require an additional call to the underlying
> DNSServer.rawDNSLookup(), because I don't think
> DNSServer.findMXRecords() ever has the redundant A records. This is
> interesting -- but with my ignorance of DNS I am just guessing.
Yes, rawDNSLookup needs to be called twice. I am adding a
DNSServer.findARecords method to do it (basically a copy/paste of
findMXRecords).
-S�ren
--
S�ren Hilmer, M.Sc.
R&D manager Phone: +45 70 27 64 00
TietoEnator IT+ Fax: +45 70 27 64 40
Ved Lunden 12 Direct: +45 87 46 64 57
DK-8230 �byh�j Email: soren.hilmer <at> tietoenator.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]