From issues-return-66113-archive-asf-public=cust-asf.ponee.io@commons.apache.org Sat Jan 27 00:56:08 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id C0BB8180676 for ; Sat, 27 Jan 2018 00:56:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AA1B9160C2E; Fri, 26 Jan 2018 23:56:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F2F1D160C50 for ; Sat, 27 Jan 2018 00:56:07 +0100 (CET) Received: (qmail 30823 invoked by uid 500); 26 Jan 2018 23:56:07 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 30756 invoked by uid 99); 26 Jan 2018 23:56:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jan 2018 23:56:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 785961801AC for ; Fri, 26 Jan 2018 23:56:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id iGdJVXWFji8T for ; Fri, 26 Jan 2018 23:56:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 5977C60D56 for ; Fri, 26 Jan 2018 23:56:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6D05FE00D3 for ; Fri, 26 Jan 2018 23:56:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 8093324122 for ; Fri, 26 Jan 2018 23:56:00 +0000 (UTC) Date: Fri, 26 Jan 2018 23:56:00 +0000 (UTC) From: "Matthew McGillis (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NET-650) IMAPClient over proxy doesn't properly resolve DNS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NET-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16341812#comment-16341812 ] Matthew McGillis commented on NET-650: -------------------------------------- > There may be no remote mapping, so you might want to add your own local definition. I would want to know that the remote does not know haw to resolve the name. > Also the code may not know that a proxy is being used. But I do and because I told it I wanted it to use the proxy. If I don't want to use the proxy I won't specify it. > As it stands, the constructor new InetSocketAddress(host, port) will use the local definition if there is one. To force the use of the remote mapping, one would need to use InetSocketAddress. InetSocketAddress(host,port) Not following the above you sure you wrote it correctly. > IMAPClient over proxy doesn't properly resolve DNS > -------------------------------------------------- > > Key: NET-650 > URL: https://issues.apache.org/jira/browse/NET-650 > Project: Commons Net > Issue Type: Bug > Components: IMAP > Affects Versions: 3.6 > Reporter: Matthew McGillis > Priority: Major > Attachments: imapproxy.java, imapproxy2.java, socketproxy.java > > > IMAPClient when configured to use a socks proxy is not able to resolve DNS names through the proxy. > See attached sample code, if I use it with: > {noformat} > $ java -DsocksProxyHost=localhost -DsocksProxyPort=16003 -cp .:./commons-net-3.6.jar imapproxy imap.server.test.com user1 userpass > connect error: java.net.UnknownHostException: imap.server.test.com: unknown error > {noformat} > vs if I use it with the appropriate IP: > {noformat} > $ java -DsocksProxyHost=localhost -DsocksProxyPort=16003 -cp .:./commons-net-3.6.jar imapproxy 10.250.3.127 user1 userpass > * OK IMAP4rev1 proxy server ready > IMAP: 10.250.3.127 143 > AAAA LOGIN ******* > AAAA OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed > AAAB LOGOUT > * BYE 10.250.3.127 Zimbra IMAP4rev1 server closing connection > AAAB OK LOGOUT completed > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)