Hi Mike,<br><br>Javamail is the &quot;official&quot; 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&#39;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">&lt;<a href="mailto:ioplex@gmail.com">ioplex@gmail.com</a>&gt;</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&#39;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 &lt;<a href="mailto:luca@dentella.it">luca@dentella.it</a>&gt; wrote:<br>
&gt; Good morning,<br>
&gt;<br>
&gt; I&#39;m working on an IMAP client using Javamail (1.4.3) and JCIFS (1.3.13) and<br>
&gt; I&#39;m trying to connect to an Exchange 2003 server with NTLM authentication.<br>
&gt;<br>
&gt; I always get the following error message:<br>
&gt; &quot;unknown user name or bad password&quot;<br>
&gt;<br>
&gt; I changed users, passwords, domain with no luck...<br>
&gt;<br>
&gt; On the Exchange Server, in Event Viewer I can read the following entry:<br>
&gt;<br>
&gt; EventID 1069, Source IMAP4SVC<br>
&gt; SSPI authentication attempt from &lt;myIP&gt; has failed with error 0x80090302.<br>
&gt;<br>
&gt; In javamail forum they suggested me to post here as Javamail uses JCIFS for<br>
&gt; NTLM handshake...<br>
&gt;<br>
&gt; The debug session with javamail:<br>
&gt;<br>
&gt; DEBUG: trying to connect to host &quot;mailexch01&quot;, port 143, isSSL false<br>
&gt; * OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1<br>
&gt; ready.<br>
&gt; A0 CAPABILITY<br>
&gt; * CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS<br>
&gt; NAMESPACE LITERAL+ UIDPLUS CHILDREN AUTH=NTLM<br>
&gt; A0 OK CAPABILITY completed.<br>
&gt; IMAP DEBUG: AUTH: NTLM<br>
&gt; DEBUG: protocolConnect login, host=&lt;myhost&gt;, user=&lt;myuser&gt;,<br>
&gt; password=&lt;non-null&gt;<br>
&gt; DEBUG NTLM: type 1 message:<br>
&gt; Type1Message[suppliedDomain=&lt;mydomain&gt;,suppliedWorkstation=&lt;mypc&gt;,flags=0x00000201]<br>
&gt; DEBUG NTLM: type 1 message length: 59<br>
&gt; A1 AUTHENTICATE NTLM<br>
&gt; +<br>
&gt; TlRMTVNTUAABAAAAASIAAAAAAAAAAAAAGwAbACAAAABNM0xYUElUMDMzLklOR0RJUkVDVC5JREkuSVQ=<br>
&gt; A1 NO Logon failure: unknown user name or bad password.<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<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>