No authentication mechanisms supported by both server and client when Configuring Microsoft Exchange SMTP Server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

When trying to establish connection to your Microsoft Exchange SMTP server, an error returns.

atlassian-confluence.log に次のエラーが返される。

com.atlassian.mail.MailException: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:193)
	at com.atlassian.confluence.jmx.JmxSMTPMailServer.send(JmxSMTPMailServer.java:80)
	at com.atlassian.confluence.admin.actions.mail.SendTestEmailAction.execute(SendTestEmailAction.java:53)

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)
	at javax.mail.Service.connect(Service.java:176)
	at javax.mail.Service.connect(Service.java:125)
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:164)
	... 257 more
tip/resting Created with Sketch.

Oops! We misspelled 'mechanisms' in the error message in the logs.


原因

Recent changes in the JavaMail API has changed certain authentication defaults and sometimes will create an authentication error with some Exchange Server environments dependent on the configuration.

ソリューション 1

  1. Set -Dmail.smtp.auth.ntlm.domain=<Domain_name> and restart Confluence.
  2. Enable TLS or SSL on the your exchange mail server for the specific mailbox.
  3. Use one of the following syntaxes for your user:
    • Domain_name\username

    • username@Domain_name.com  

If this is not successful, try downgrading the mail jar:

ソリューション 2

  1. Make a backup of "$Confluence_install/confluence/WEB-INF/lib/mail-1.4.5.jar" and move it to another directory;

    If you're running Confluence EAR/WAR or has any mail server configured via JNDI, the "mail-1.4.5.jar" class will be on "$CATALINA_HOME/lib".

  2. Download mail-1.4.1.jar 
  3. Stop Confluence;
  4. Copy the "mail-1.4.1.jar" for "$Confluence_install/confluence/WEB-INF/lib/" (or "$CATALINA_HOME/lib" in case of a EAR/WAR Confluence deploy);
  5. Start Confluence and check now if Confluence was able to connect in Exchange.

ソリューション 3

  1. Remove the existing mail server configuration
  2. Create a new one leaving username and password empty
  3. Restart the server

    tip/resting Created with Sketch.

    This will solve the problem when the authentication is not needed (usually for exchange servers)


最終更新日 2018 年 11 月 12 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.