On 26 Oct 1999, Juergen Kreileder wrote:
> As said before, what java tries to do is:
>
> 1. Connect to System.getProperty("mail.host") on the smtp port (number
> 25).
> 2. If 1 failed connect to localhost on the smtp port
> 3. If 2 failed lookup mailhost (which is not the same as localhost on
> many systems), if mailhost is unknown throw a UnknownHostException
> else try to connect to mailhost on the smtp port, if that fails
> throw a ConnectException.
The problem is that (3) uses the InetAddr class to do a DNS lookup, which
calls gethostbyname (on unix, at least). This is just plain wrong, since
this looks up A records for mailhost, when it should be looking up MX
records of mailhost. So, if mailhost has MX records and no A records,
which is perfectly valid, java will fail.
There's no good way around this.
Brian
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]