Josip,
Chris Burdess reproduced the problem last night, and when I ran a little
test driver on both Windows and linux, I found that this works on Windows
and fails on linux:
static public void main(String[] args)
{
String host = "193.95.196.170.";
int port = 25;
try {
java.net.Socket socket = new java.net.Socket(host, port);
} catch (java.net.UnknownHostException uhex) {
uhex.printStackTrace();
} catch (java.io.IOException ioe) {
ioe.printStackTrace();
}
}
If you remove the trailing '.' from the IP address it succeeds on both.
I ran additional tests to see why connecting doesn't always fail on linux.
dnsjava lookup (including his current release) adds a trailing '.' to the
result from the MX record search. If lookup results in a CNAME (canonical
name, e.g., mail.server.tld) it is handled fine by Sun's linux
implementation, but if it results in an A record (IP address) it fails (as
demonstrated above).
So we have a resolution, and understanding of the issue. I am CC'ing the
JavaMail-Interest list to close the issue, since it is not a JavaMail
problem (although Sun might look into the differential behavior of Java),
and Brian Wellington, author of dnsjava.
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]