Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 75468 invoked from network); 28 Nov 2006 14:24:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2006 14:24:53 -0000 Received: (qmail 36657 invoked by uid 500); 28 Nov 2006 14:24:59 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 36617 invoked by uid 500); 28 Nov 2006 14:24:58 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 36606 invoked by uid 99); 28 Nov 2006 14:24:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 06:24:58 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jaw981@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 06:24:46 -0800 Received: by nf-out-0910.google.com with SMTP id x37so2435435nfc for ; Tue, 28 Nov 2006 06:24:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=JVnH5dWWblAuJUAvLKBJW78C8f9OFGGFzagMEm5AbGalQJ8OFjxXpjujzLLkEOr2VFVUxXOriyL8b8bFi4+pvhu62KZnL3hvY5q5Y/1bV0fUofWZOdrbrPNIgYBA3OLflBuCf0t2bZuWjjk43BKgGozE7sjJGLJMtFZgWRhCIfs= Received: by 10.82.190.2 with SMTP id n2mr172835buf.1164723864766; Tue, 28 Nov 2006 06:24:24 -0800 (PST) Received: by 10.82.151.18 with HTTP; Tue, 28 Nov 2006 06:24:24 -0800 (PST) Message-ID: <73a75e430611280624m18ef2360xf24be7ef837e0a2f@mail.gmail.com> Date: Tue, 28 Nov 2006 09:24:24 -0500 From: "Jason Warner" To: dev@geronimo.apache.org, rickmcg@gmail.com Subject: Re: SSL Socket connection for POP3 In-Reply-To: <456C0BD9.9060104@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7821_12516547.1164723864689" References: <73a75e430611272109u6c7df9beyc3f9228eff9b4e4a@mail.gmail.com> <456C0BD9.9060104@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_7821_12516547.1164723864689 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline That's what I was looking for. Thanks, Rick. Jason On 11/28/06, Rick McGuire wrote: > > Jason Warner wrote: > > I've been working on implementing the option to use an ssl connection > > when establishing a socket for pop3. I'm having an issue finding a > > way to determine whether to use the ssl connection or not. For the > > SMTPTransport, this is done when the object is instantiated by passing > > in a boolean value for this. Is there an easier way to this for the > > POP3Store rather than tracking down all instances of it and specifying > > the same boolean value? > I'm not totally certain I understand your question, so let me just > explain how that boolean is used with the SMTPTransport class and then > point you to how Sun does SSL enablement of POP3 in their > implementation, which appears to be very similar to what has been done > for SMTPTransport. > > There are actually 2 SMTP transport classes that can be configured and > used: SMTPTransport and SMTPSTransport. SMTPSTransport is a subclass > of the first, and just specifies "true" for the useSSL argument of the > constructor. It also uses a different default port an protocol name > ("smtps"). Note that superclass constructor is protected, so only > available to the subclasses. That superclass constructor is the only > difference between the SMTPTransport and the SMTPSTransport class. So > the chose of using a secure connection is determined by which transport > is requested in the application code, not by passing in a boolean. The > underlying SMTPTransport implements the SSL support, but it is only > enabled when the SMTPSTransport is used. > > Sun appears to do something very similar with POP3. There provider set > includes a POP3Store and a POP3SSLStore. Here's the javadoc for the > POP3SSLStore: > > > http://java.sun.com/products/javamail/javadocs/com/sun/mail/pop3/POP3SSLStore.html > > Since it only appears to have added the single constructor, I'm guessing > this is very similar to how the SMTPTransport stuff was handled. The > store provider name that maps to the POP3SS:LStore class is "pop3s". > The default port appears to be 995. > > Rick > > > > > > -Jason > > ------=_Part_7821_12516547.1164723864689 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline That's what I was looking for.  Thanks, Rick.

Jason

On 11/28/06, Rick McGuire <rickmcg@gmail.com> wrote:
Jason Warner wrote:
> I've been working on implementing the option to use an ssl connection
> when establishing a socket for pop3.  I'm having an issue finding a
> way to determine whether to use the ssl connection or not.  For the
> SMTPTransport, this is done when the object is instantiated by passing
> in a boolean value for this.  Is there an easier way to this for the
> POP3Store rather than tracking down all instances of it and specifying
> the same boolean value?
I'm not totally certain I understand your question, so let me just
explain how that boolean is used with the SMTPTransport class and then
point you to how Sun does SSL enablement of POP3 in their
implementation, which appears to be very similar to what has been done
for SMTPTransport.

There are actually 2 SMTP transport classes that can be configured and
used:  SMTPTransport and SMTPSTransport.  SMTPSTransport is a subclass
of the first, and just specifies "true" for the useSSL argument of the
constructor.  It also uses a different default port an protocol name
("smtps").  Note that superclass constructor is protected, so only
available to the subclasses.  That superclass constructor is the only
difference between the SMTPTransport and the SMTPSTransport class.  So
the chose of using a secure connection is determined by which transport
is requested in the application code, not by passing in a boolean.  The
underlying  SMTPTransport  implements  the SSL support, but it is only
enabled when the SMTPSTransport is used.

Sun appears to do something very similar with POP3.  There provider set
includes a POP3Store and a POP3SSLStore.  Here's the javadoc for the
POP3SSLStore:

http://java.sun.com/products/javamail/javadocs/com/sun/mail/pop3/POP3SSLStore.html

Since it only appears to have added the single constructor, I'm guessing
this is very similar to how the SMTPTransport stuff was handled.  The
store provider name that maps to the POP3SS:LStore class is "pop3s".
The default port appears to be 995.

Rick


>
> -Jason


------=_Part_7821_12516547.1164723864689--