Connection to Microsoft Exchange SMTP server fails with no authentication mechanisms supported error in Jira server
When trying to establish connection to your Microsoft Exchange SMTP server, an error returns.
The following appears in the
[action.admin.mail.VerifyMailServerConnection$VerifyMailServer] Unable to connect to the server at <mail_server> due to the following exception: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client
And, the following appears in
com.atlassian.mail.MailException: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:201) at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:44) (...) Caused by: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:760) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673) at javax.mail.Service.connect(Service.java:317)
Oops! We misspelled 'mechansims in the error message in the logs.
Misconfiguration between the JIRA application and the Exchange Server.
- Set the following JVM startup argument "
-Dmail.smtp.auth.ntlm.domain=<Domain_name>"by following the Setting properties and options on startup documentation and restart the JIRA application.
- Ensure the configuration of the SMTP is correct: check the protocol, port and also if the Exchange Mail Server for the specific mailbox requires or not TLS.
- Use one of the following syntaxes for your user:
Some Exchange servers do not require username and password, try leaving both empty in JIRA SMTP configuration.
The above suggestion is expected to work for most customers. However, if you are unable to apply this fix, or it doesn't work, there's another possible fix:
Workaround for versions below 5.2
Make a backup of
"$JIRA_INSTALL/atlassian-jira/WEB-INF/lib/mail-1.4.5.jar"and move it to another directory;
If you're runningor has any mail server configured via , the
"mail-1.4.5.jar"class will be on
- Download mail-1.4.1.jar (or pick it from from an older JIRA version such as 4.4.4);
- Stop JIRA;
- Copy the
"$CATALINA_HOME/lib"in case of a EAR/WAR JIRA deploy);
- Start your JIRA application and check now if it was able to connect in Exchange.