Javamail NTLM Authentication Failure

前端 未结 5 1066
误落风尘
误落风尘 2020-12-06 11:02

Trying to connect to Exchange server using NTLM in JavaMail. I can connect to SMTP, but not IMAP. I can also authenticate via the OS X Mail.app application using the ident

5条回答
  •  [愿得一人]
    2020-12-06 11:38

    From what I recall about NTLM, and your NTLM debug messages I can gather the following:

    • NTLM was designed for single sign on, thus taking credentials from the windows machine its running on - especially the JDK implementation of NTLM.
      • NTLM has two versions, well three to be exact. NTLM v1, NTLMv2 and another version I can't recall at the moment. NTLM v1 has a security hole which allows you to really use a username and password and connect using the NTLM protocol. In NTLM v2 it was fixed, which forces the implementation to take the password (the hashed pass) from the logged in Windows machine.
      • It seems that the NTLM protocol in your case stops after the first message sent by the Exchange server. Notice it has flags which declares which type of NTLM is used and other such as : Encryption, etc.

    I suggest you try following the road in which the credentials (u/p) are taken automatically by the JDK from the client Windows machine.

提交回复
热议问题