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
Try setting the domain "" to the properties of the imap store :
properties.setProperty("mail.imap.auth.ntlm.domain","");
Since in SMTP you are login using LOGIN, the use of the domain is not necessary. But in NTLM the domain is mandatory.