Support Article
Unable to connect to email server
SA-2
Summary
Unable to connect to email server in production through unsecured port 25.
Error Messages
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217)
at sun.security.validator.Validator.validate(Validator.java:218)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1188)
... 67 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318)
... 73 more
2014-05-21 16:10:22,760 <redacted> (ivity<redacted>) ERROR <redacted> MessagingException caught connecting to email server: javax.mail.MessagingException;
nested exception is:
java.io.IOException
javax.mail.MessagingException;
nested exception is:
java.io.IOException
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:571)
at javax.mail.Service.connect(Service.java:288)
at com.pegarules.generated.activity.ra_action_pop3orimapconnectivity_cf9add42d192e539d0253070baaa2314.step5_circum0(ra_action_pop3orimapconnectivity_cf9add42d192e539d0253070baaa2314.java:861)
at com.pegarules.generated.activity.ra_action_pop3orimapconnectivity_cf9add42d192e539d0253070baaa2314.perform(ra_action_pop3orimapconnectivity_cf9add42d192e539d0253070baaa2314.java:161)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3040)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:617)
Steps to Reproduce
Attempt to connect directly to Windows 2003 Exchange Server through unsecured port 25
Root Cause
PRPC attempted to use TLS to connect through unsecured port 25.
The backend server was detected to support TLS.
There are underlying flaws in te PRPC code that have been addressed - see resolution below.
Resolution
This case was resolved by connecting to a relay email server rather than directly to the Exchange server. This was part of an overall infrastructure change that suppressed the behavior of PRPC causing the issue to occur.
Related hot fixes:
HFix-6859 which conditionally suppresses the StartTLS request if the mail server supports TLS.
HFix-8936 which fixes a problem in PRPC in supporting TLS
Published February 15, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.