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: Mystery: Unknown SMTP host exception for a known host
Date Fri, 07 Mar 2003 18:04:33 GMT

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 = "";
		int port = 25;

		try {
			java.net.Socket socket = new java.net.Socket(host, port);
		} catch (java.net.UnknownHostException uhex) {
		} catch (java.io.IOException ioe) {

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: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org

View raw message