Norman Maurer ha scritto:
Yes i have a localhost mapping...
I think the problem is here:
try
{
mail = createMail(createMessage(), intendedRecipient);
}
catch (ParseException ex)
{
handleParseException(ex);
return;
}
catch (UnknownHostException ex)
{
handleUnknownHostException(ex);
return;
}
The createMail(...) call getAddress(), getAdress() throws the
Unknownhostexception because it can't parse the ipaddress. Then we call
handleUnknowHostException(..) and just ignore the message.
If getRemoteAddress is returning an UnknownHostException then we should
search the bug there: why on your system it returns UnknownHostException?
As I wrote in the previous mail I think that a key to understand what's
going on is to know what exactly happen here:
-----
try
{
InetAddress addr1 = java.net.InetAddress.getLocalHost();
// These shenanigans are required to get the fully qualified
// hostname prior to JDK 1.4 in which getCanonicalHostName()
// does the job for us
InetAddress addr2 =
java.net.InetAddress.getByName(addr1.getHostAddress());
InetAddress addr3 =
java.net.InetAddress.getByName(addr2.getHostName());
domainBuffer.append(addr3.getHostName());
}
catch (UnknownHostException ue)
{
domainBuffer.append("[127.0.0.1]");
}
-----
As you can see the getDomain catches the UnknownHostException and
returns [127.0.0.1] if it happens, so either the getRemoteAddress is not
handling correctly the "[127.0.0.1]" input or the getByNames sequence
above is returning something that the getRemoteAddress will not resolve.
We need to know what is happening to understand what's wrong.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]