You've very accurately described the behavior of JAMES's DNS lookup. Here's exactly what it's doing... it queries the DNS server(s) for MX records. It then looks at the response for MX records (exclusively, since that's what it asked for). If no MX records are found, it attempts to use the domain name as the delivery server (this is why it attempts to deliver to egroups.com). The DNS code is pretty well separated and probably could handle delegations as you described, but I'm not sure if that is correct as I don't think you should be pointing to the root DNS servers. I guess in theory a local DNS server could use delegations of authority, but I've yet to see it happen with my BIND server (maybe I could configure it as such). Do others feel this is good behavior to implement? Interesting point... Serge Knystautas Loki Technologies http://www.lokitech.com/ Enzo Michelangeli wrote: > > Folks, > > I suspect that the resolver in JAMES gets easily confused while looking for > MX records if delegations of authority are involved. For example, here are > the last few lines captured in a DOS windows under Win95 (JAMES's version is > 1.1b1): > > ----------------- 8< ----------------- > ..java:233) > at org.apache.avalon.blocks.timeserver.Alarm.run(Alarm.java, Compiled > Code) > at org.apache.avalon.utils.recycle.pool.Worker.run(Worker.java, Compiled > Code) > javax.mail.MessagingException: Could not connect to SMTP host: egroups.com, > port: 25; nested exception is: > java.net.ConnectException: Connection refused: no further information > at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:695) > at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:168) > at javax.mail.Service.connect(Service.java:227) > at javax.mail.Service.connect(Service.java:131) > at javax.mail.Service.connect(Service.java:87) > at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:105) > at > org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.jav > a, Compiled Code) > at > org.apache.james.transport.mailets.RemoteDelivery.wake(RemoteDelivery.java:2 > 33) > at org.apache.avalon.blocks.timeserver.Alarm.run(Alarm.java, Compiled > Code) > at org.apache.avalon.utils.recycle.pool.Worker.run(Worker.java, Compiled > Code) > ----------------- 8< ----------------- > > JAMES was trying to deliver a mail to an address @egroups.com, and I had > configured it to use e.root-servers.net as DNS server. That server, when > queried for MX records, returns a bunch of NS records to other root servers: > > ----------------- 8< ----------------- > Header: > ID=37955, QR=Query, Opcode=QUERY, RCODE=NO ERROR > Authoritative Answer=No, Truncation=No > Recursion Desired=Yes, Recursion Available=No > QDCOUNT=1, ANCOUNT=0, NSCOUNT=12, ARCOUNT=12 > Question: > Name=egroups.com, QTYPE=MX, QCLASS=1 > Authority Records Section: > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=20 > Name Server=A.ROOT-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=17 > Name Server=E.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=F.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=F.ROOT-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=J.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=K.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=A.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=M.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=G.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=C.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=I.GTLD-SERVERS.NET > - Name=com > Type=NS, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > Name Server=B.GTLD-SERVERS.NET > Additional Records Section: > - Name=A.ROOT-SERVERS.NET > Type=A, Class=1, TTL=3600000 (41 Days 16 Hours), RDLENGTH=4 > IP Address=198.41.0.4 > - Name=E.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=207.200.81.69 > - Name=F.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=198.17.208.67 > - Name=F.ROOT-SERVERS.NET > Type=A, Class=1, TTL=3600000 (41 Days 16 Hours), RDLENGTH=4 > IP Address=192.5.5.241 > - Name=J.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=198.41.0.21 > - Name=K.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=195.8.99.11 > - Name=A.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=198.41.3.38 > - Name=M.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=210.176.152.18 > - Name=G.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=198.41.3.101 > - Name=C.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=205.188.185.18 > - Name=I.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=192.36.144.133 > - Name=B.GTLD-SERVERS.NET > Type=A, Class=1, TTL=518400 (6 Days), RDLENGTH=4 > IP Address=203.181.106.5 > ----------------- 8< ----------------- > > In turn, A.ROOT-SERVERS.NET returns further indirection: > > ----------------- 8< ----------------- > Header: > ID=37790, QR=Response, Opcode=QUERY, RCODE=NO ERROR > Authoritative Answer=No, Truncation=No > Recursion Desired=Yes, Recursion Available=No > QDCOUNT=1, ANCOUNT=0, NSCOUNT=2, ARCOUNT=2 > Question: > Name=egroups.com, QTYPE=MX, QCLASS=1 > Authority Records Section: > - Name=egroups.com > Type=NS, Class=1, TTL=172800 (2 Days), RDLENGTH=6 > Name Server=NS1.egroups.com > - Name=egroups.com > Type=NS, Class=1, TTL=172800 (2 Days), RDLENGTH=6 > Name Server=NS2.egroups.com > Additional Records Section: > - Name=NS1.egroups.com > Type=A, Class=1, TTL=172800 (2 Days), RDLENGTH=4 > IP Address=207.138.41.131 > - Name=NS2.egroups.com > Type=A, Class=1, TTL=172800 (2 Days), RDLENGTH=4 > IP Address=207.138.41.132 > ----------------- 8< ----------------- > > ....and, of course, finally NS1.egroups.com returns the proper MX record. But > instead of going through all the steps, JAMES seems to try to open a > connection directly to egroups.com, thus failing to deliver. Once replaced > the name of the DNS server with a.root-servers.net, reducing the level of > indirection to one NS before the MX, the delivery has succeeded (flushing > the "delayed" queue). > > So, I guess the resolver will have to be modified to make it persever > through sequences of NS and possibly CNAME records... > > Cheers -- > > Enzo ------------------------------------------------------------ To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/> Problems?: [EMAIL PROTECTED]
