Hans Liebenberg wrote:
>
>
> My current findings regarding the remoteReceivedHeader issue:
>
> On my local windows server the xbill dns can resolve
> "localhost" without
> error but on both my linux servers it can't.
> A normal nslookup or dig works fine though.
> It seems to be an XBILL issue:
>
> InetAddress ip = org.xbill.DNS.Address.getByName("localhost");
>
> Resolves fine on my windows server but fails on my linux
> servers with an
> UnKnownHostException
>
> I tried to get the latest xbill dns jar but it doesn't seem
> to be compatible
> with James 2.2.
>
> I will post a message on the xbill mailing list too.

Great, I'ld like to see their response. There does seem to be an
inconsistency here which hopefully they can resolve.

> I have temporarily hacked the
> MessageProcessor.computeRemoteAddress() to
> return 127.0.0.1 for "localhost", but am still desperately
> looking for the
> correct solution
The current fetchmail code is intended to resort to 127.0.0.1 if all else
fails, (...MessageProcessor.computeRemoteDomain())...

        // If a domain was not found, the default is the local host and
        // if we cannot resolve this, the local address 127.0.0.1
        // Note that earlier versions of this code simply used 'localhost'
        // which works fine with java.net but is not resolved by dnsjava
        // which was introduced in v2.2.0. See Jira issue JAMES-302.
        if (domainBuffer.length() == 0)
        {
            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 hack, please try the version at
http://svn.apache.org/repos/asf/james/server/trunk/src/java/org/apache/james
/fetchmail/ and report back.

Cheers

-- Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to