E-mail problem with Office365 configuration
Hello there,
In my company we're using Office365 as our e-mail server. In JTS we're using the following configuration:
SMTP server: smtp.office365.com
SMTP Port: 587
STARTTLS: true
When I try to send a test e-mail, the following error is showed:
Can't send command to SMTP host; nested exception is: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is: java.security.cert.CertPathValidatorException: The certificate issued by CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US is not trusted; internal cause is: java.security.cert.CertPathValidatorException: Certificate chaining error
Does anybody had this problem?
Any idea? tips?
Since now, thanks.
Accepted answer
I solved the problem with these steps:
1) I got the correct certificate from the smtp server with this command:
openssl s_client -connect smtp.office365.com:587 -starttls smtp -showcerts | openssl x509 -outform PEM -out cert_smtp_office365.crt
2) I added the certificate in WAS in the page "Security > SSL certificate and key management > key store and certificate > CellDefaultTrustStore".
3) I restarted the DMGR and nodeagents.
It worked.
Comments
This is still not working for me. I used the command above to extract the certificate. Since I am using WebSphere Liberty I imported the certificate into the certificate store for Liberty here:
C:\IBM\CLM604\server\jre\lib\security\cacerts
I verified the cert was there. Is there a different place this should be imported?
I am still getting the error:
Unable to convert connection to SSL (javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: PKIXCertPathBuilderImpl could not build a valid CertPath.)
It is working now. I found the correct certificate store here:
C:\IBM\CLM604\server\liberty\servers\clm\resources\security\ibm-team-ssl.keystore
This is also defined in the default keystore setting in the server.xml file located:
C:\IBM\CLM604\server\liberty\servers\clm