Hi Mike,<br><br>Javamail is the "official" Sun library to manage mail-tasks with Java:<br><a href="http://java.sun.com/products/javamail/">http://java.sun.com/products/javamail/</a><br><br>In their latest version they added NTLM support using JCIFS:<br>
<a href="http://java.sun.com/products/javamail/downloads/index.html">http://java.sun.com/products/javamail/downloads/index.html</a><br><br>and in the included readme they suggest the latest JCIFS jar... <br><br>The source code is here:<br>
<a href="http://kenai.com/projects/javamail">http://kenai.com/projects/javamail</a><br><br>but I can't find the exact source where they use JCIFS, probably:<br><a href="http://kenai.com/projects/javamail/sources/mercurial/content/mail/src/main/java/com/sun/mail/auth/Ntlm.java?rev=248">http://kenai.com/projects/javamail/sources/mercurial/content/mail/src/main/java/com/sun/mail/auth/Ntlm.java?rev=248</a><br>
<br>Thanks!<br><br><br><div class="gmail_quote">2010/1/19 Michael B Allen <span dir="ltr"><<a href="mailto:ioplex@gmail.com">ioplex@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Luca,<br>
<br>
I have never heard of Javamail so you'll have to go deeper. Perhaps<br>
you can find the code in Javamail that uses JCIFS and post it here?<br>
<br>
Mike<br>
<div><div></div><div class="h5"><br>
On Tue, Jan 19, 2010 at 7:00 AM, Luca Dentella <<a href="mailto:luca@dentella.it">luca@dentella.it</a>> wrote:<br>
> Good morning,<br>
><br>
> I'm working on an IMAP client using Javamail (1.4.3) and JCIFS (1.3.13) and<br>
> I'm trying to connect to an Exchange 2003 server with NTLM authentication.<br>
><br>
> I always get the following error message:<br>
> "unknown user name or bad password"<br>
><br>
> I changed users, passwords, domain with no luck...<br>
><br>
> On the Exchange Server, in Event Viewer I can read the following entry:<br>
><br>
> EventID 1069, Source IMAP4SVC<br>
> SSPI authentication attempt from <myIP> has failed with error 0x80090302.<br>
><br>
> In javamail forum they suggested me to post here as Javamail uses JCIFS for<br>
> NTLM handshake...<br>
><br>
> The debug session with javamail:<br>
><br>
> DEBUG: trying to connect to host "mailexch01", port 143, isSSL false<br>
> * OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1<br>
> ready.<br>
> A0 CAPABILITY<br>
> * CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS<br>
> NAMESPACE LITERAL+ UIDPLUS CHILDREN AUTH=NTLM<br>
> A0 OK CAPABILITY completed.<br>
> IMAP DEBUG: AUTH: NTLM<br>
> DEBUG: protocolConnect login, host=<myhost>, user=<myuser>,<br>
> password=<non-null><br>
> DEBUG NTLM: type 1 message:<br>
> Type1Message[suppliedDomain=<mydomain>,suppliedWorkstation=<mypc>,flags=0x00000201]<br>
> DEBUG NTLM: type 1 message length: 59<br>
> A1 AUTHENTICATE NTLM<br>
> +<br>
> TlRMTVNTUAABAAAAASIAAAAAAAAAAAAAGwAbACAAAABNM0xYUElUMDMzLklOR0RJUkVDVC5JREkuSVQ=<br>
> A1 NO Logon failure: unknown user name or bad password.<br>
><br>
> Thanks!<br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Michael B Allen<br>
Java Active Directory Integration<br>
<a href="http://www.ioplex.com/" target="_blank">http://www.ioplex.com/</a><br>
<br>
</font></blockquote></div><br>