Issue
- I have configured Microsoft Exchange as SMTP Server for Jenkins and a similar stacktrace on my job console output is being shown
javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669)
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 javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:566)
...
Environment
- CloudBees Jenkins Enterprise - Managed Master (CJE-MM)
- CloudBees Jenkins Enterprise - Operations Center (CJE-OC)
- CloudBees Jenkins Team (CJT)
- CloudBees Jenkins Platform - Client Master (CJP-CM)
- CloudBees Jenkins Platform - Operations Center (CJP-OC)
- Jenkins LTS
- Microsoft Exchange - configured as NTLM authentication.
Resolution
On Jenkins side
-
Add the Java Property
-Dmail.smtp.auth.ntlm.domain=<Domain_name>
and restart Jenkins -
Configure SMTP Server under Manage Jenkins > Configure System as follows:
2.1. Use one of the following syntaxes for your user:
Domain_name\username
,username@Domain_name.com
2.2. Enable SSL
On STMP server side: Microsoft Exchange
Enable TLS or SSL on the your exchange mail server for the specific mailbox.
Tested on
The latest update of this article has been tested with:
- CloudBees Jenkins Platform - Client Master (CJP-CM) 1.625.18.3
0 Comments