Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 58747 invoked from network); 7 Aug 2010 23:28:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Aug 2010 23:28:26 -0000 Received: (qmail 66571 invoked by uid 500); 7 Aug 2010 23:28:25 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 66119 invoked by uid 500); 7 Aug 2010 23:28:23 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 66111 invoked by uid 99); 7 Aug 2010 23:28:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Aug 2010 23:28:23 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ferindo.middleton@gmail.com designates 74.125.82.49 as permitted sender) Received: from [74.125.82.49] (HELO mail-ww0-f49.google.com) (74.125.82.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Aug 2010 23:28:16 +0000 Received: by wwi14 with SMTP id 14so10538918wwi.6 for ; Sat, 07 Aug 2010 16:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=u84NZMqlSCr1fZM/GI1HiAum5cIfh8XkCqrUHQDFs+w=; b=JoLuSLpE0xaZqEMfa+SCTP30FpqmEA6X2LtaJnSH1qxHI/bAMyrTYxTjhLjF2/a6HC IwlALncqYMkeC1U62QKi1rg5wR1HOIMm2fi+ItWFU5qegppG5kj6xmCtPLkiFjYV/uiA z6BYtdCn4Vqq+fzOjW+Kd/3Zbz9+dbfR/nKro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TmvAG45BlWQPqkTsNAy8tPw6ROmNQgVRVK8H7LfZcvoiWr+r+wBJLv5fc01wOZWfG5 8NpDup5Jb2AqjzURuVOzvbMGxlLaynM8CH2gby0oDg5KBk6B+HAohThnRzE5AECKfIvJ eaoF7EvUJxQFshFVQxmXwkqrne+IbobqloilY= MIME-Version: 1.0 Received: by 10.216.53.19 with SMTP id f19mr1038561wec.22.1281223674237; Sat, 07 Aug 2010 16:27:54 -0700 (PDT) Received: by 10.216.184.133 with HTTP; Sat, 7 Aug 2010 16:27:54 -0700 (PDT) Date: Sat, 7 Aug 2010 19:27:54 -0400 Message-ID: Subject: Re: [email] Exchange Server Authentication / NTLM From: Ferindo Middleton To: user@commons.apache.org Content-Type: multipart/alternative; boundary=0016e6db24d0fb13f8048d442123 --0016e6db24d0fb13f8048d442123 Content-Type: text/plain; charset=ISO-8859-1 Thank you for your guidance Siegfried! I upgraded to JavaMail version 1.4.3 but still getting some errors using same code as before. Log file below.. I did remove identifying info of the server: seems like they're having some kind of handshake problem. Maybe I'm just using the wrong port. Does client server communication usually switch from plain text to encrypted right in the middle of communication or should it be going over a secured port starting out. I don't have any way of talking to Exchange server admin at this org. log file below: DEBUG: JavaMail version 1.4.3 DEBUG: successfully loaded resource: /META-INF/javamail.default.providers DEBUG: Tables of loaded providers DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]} DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]} DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "xxx.xxx.xxx", port 25, isSSL false 220 xxx.xxx.xxx Microsoft ESMTP MAIL Service ready at Wed, 4 Aug 2010 16:43:28 -0400 DEBUG SMTP: connected to host "xxx.xxx.xxx", port: 25 EHLO xx.xx.xx 250-xxx.xxx.xxx Hello [165.13.128.8] 250-SIZE 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-X-ANONYMOUSTLS 250-AUTH NTLM 250-X-EXPS GSSAPI NTLM 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250-XEXCH50 250 XRDST DEBUG SMTP: Found extension "SIZE", arg "" DEBUG SMTP: Found extension "PIPELINING", arg "" DEBUG SMTP: Found extension "DSN", arg "" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "STARTTLS", arg "" DEBUG SMTP: Found extension "X-ANONYMOUSTLS", arg "" DEBUG SMTP: Found extension "AUTH", arg "NTLM" DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "BINARYMIME", arg "" DEBUG SMTP: Found extension "CHUNKING", arg "" DEBUG SMTP: Found extension "XEXCH50", arg "" DEBUG SMTP: Found extension "XRDST", arg "" STARTTLS 220 2.0.0 SMTP server ready org.apache.commons.mail.EmailException: Sending the email to the following server failed : xxx.xxx.xxx:25 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242) at org.apache.commons.mail.Email.send(Email.java:1267) at test.sendTheEmail(test.java:124) at test.doGet(test.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Unknown Source) Caused by: javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1652) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:534) at javax.mail.Service.connect(Service.java:313) at javax.mail.Service.connect(Service.java:172) at javax.mail.Service.connect(Service.java:121) at javax.mail.Transport.send0(Transport.java:190) at javax.mail.Transport.send(Transport.java:120) at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232) ... 18 more Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:503) at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:443) at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1647) ... 25 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 36 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 42 more -- Ferindo --0016e6db24d0fb13f8048d442123--