Authenticate failed error when connecting to Exchange

Problem

When trying to set up an IMAP service for JIRA applications notifications, you get an error AUTHENTICATE Failed. After enabling mail debugging, the following appears in the logs:

2009-04-23 10:09:50.939177500 * OK Microsoft Exchange Server 2007 IMAP4 service ready
2009-04-23 10:09:50.939217500 A0 CAPABILITY
2009-04-23 10:09:51.211202500 * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS IDLE NAMESPACE LITERAL+
2009-04-23 10:09:51.211203500 A0 OK CAPABILITY completed.
2009-04-23 10:09:51.211300500 IMAP DEBUG: AUTH: NTLM
2009-04-23 10:09:51.211327500 IMAP DEBUG: AUTH: GSSAPI
2009-04-23 10:09:51.211350500 IMAP DEBUG: AUTH: PLAIN
2009-04-23 10:09:51.211402500 A1 AUTHENTICATE PLAIN
2009-04-23 10:09:51.482135500 +
2009-04-23 10:09:51.482179500
some encrypted password
2009-04-23 10:09:51.777145500 A1 NO AUTHENTICATE failed.
2009-04-23 10:09:51.777672500 
2009-04-23 17:09:51,777 JiraQuartzScheduler_Worker-3 ERROR [service.services.mail.MailFetcherService] PROJECT - TST[10016]: 
Error connecting to host 'exchange.example.com' as user 'example@example.com' via protocol 'imap': 
javax.mail.AuthenticationFailedException: AUTHENTICATE failed.
2009-04-23 10:09:51.777674500 javax.mail.AuthenticationFailedException: AUTHENTICATE failed.

Cause

This is caused by a security setting on the Exchange server that doesn't allow plain authentication.

Resolution

If you are connecting via IMAP, set the following JVM System property:

-Dmail.imap.auth.plain.disable=true

If you are connection via IMAPS (Secure IMAP), set the following JVM System property:

-Dmail.imaps.auth.plain.disable=true

Refer to Setting Properties and Options on Startup for more details.

 

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport