[jcifs] Javamail IMAP NTLM handshake

Luca Dentella luca at dentella.it
Wed Jan 20 01:47:34 MST 2010


Hi Mike,

Javamail is the "official" Sun library to manage mail-tasks with Java:
http://java.sun.com/products/javamail/

In their latest version they added NTLM support using JCIFS:
http://java.sun.com/products/javamail/downloads/index.html

and in the included readme they suggest the latest JCIFS jar...

The source code is here:
http://kenai.com/projects/javamail

but I can't find the exact source where they use JCIFS, probably:
http://kenai.com/projects/javamail/sources/mercurial/content/mail/src/main/java/com/sun/mail/auth/Ntlm.java?rev=248

Thanks!


2010/1/19 Michael B Allen <ioplex at gmail.com>

> Hi Luca,
>
> I have never heard of Javamail so you'll have to go deeper. Perhaps
> you can find the code in Javamail that uses JCIFS and post it here?
>
> Mike
>
> On Tue, Jan 19, 2010 at 7:00 AM, Luca Dentella <luca at dentella.it> wrote:
> > Good morning,
> >
> > I'm working on an IMAP client using Javamail (1.4.3) and JCIFS (1.3.13)
> and
> > I'm trying to connect to an Exchange 2003 server with NTLM
> authentication.
> >
> > I always get the following error message:
> > "unknown user name or bad password"
> >
> > I changed users, passwords, domain with no luck...
> >
> > On the Exchange Server, in Event Viewer I can read the following entry:
> >
> > EventID 1069, Source IMAP4SVC
> > SSPI authentication attempt from <myIP> has failed with error 0x80090302.
> >
> > In javamail forum they suggested me to post here as Javamail uses JCIFS
> for
> > NTLM handshake...
> >
> > The debug session with javamail:
> >
> > DEBUG: trying to connect to host "mailexch01", port 143, isSSL false
> > * OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1
> > ready.
> > A0 CAPABILITY
> > * CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS
> > NAMESPACE LITERAL+ UIDPLUS CHILDREN AUTH=NTLM
> > A0 OK CAPABILITY completed.
> > IMAP DEBUG: AUTH: NTLM
> > DEBUG: protocolConnect login, host=<myhost>, user=<myuser>,
> > password=<non-null>
> > DEBUG NTLM: type 1 message:
> >
> Type1Message[suppliedDomain=<mydomain>,suppliedWorkstation=<mypc>,flags=0x00000201]
> > DEBUG NTLM: type 1 message length: 59
> > A1 AUTHENTICATE NTLM
> > +
> >
> TlRMTVNTUAABAAAAASIAAAAAAAAAAAAAGwAbACAAAABNM0xYUElUMDMzLklOR0RJUkVDVC5JREkuSVQ=
> > A1 NO Logon failure: unknown user name or bad password.
> >
> > Thanks!
> >
>
>
>
> --
> Michael B Allen
> Java Active Directory Integration
> http://www.ioplex.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20100120/d6b39cef/attachment.html>


More information about the jCIFS mailing list