SMTP发件人证书问题

时间:2017-08-01 19:19:46

标签: mirth mirth-connect

我正在使用Mirth Connect 3.4.2.8129。我正在尝试让SMTP发件人工作,但我遇到以下异常:

SMTP Sender error
ERROR MESSAGE: Error sending email message
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp10.phimail-dev.com:587
    at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1401)
    at org.apache.commons.mail.Email.send(Email.java:1428)
    at com.mirth.connect.connectors.smtp.SmtpDispatcher.send(SmtpDispatcher.java:248)
    at com.mirth.connect.donkey.server.channel.DestinationConnector.handleSend(DestinationConnector.java:822)
    at com.mirth.connect.donkey.server.channel.DestinationConnector.process(DestinationConnector.java:476)
    at com.mirth.connect.donkey.server.channel.DestinationChain.doCall(DestinationChain.java:121)
    at com.mirth.connect.donkey.server.channel.DestinationChain.call(DestinationChain.java:63)
    at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1715)
    at com.mirth.connect.donkey.server.channel.Channel.dispatchRawMessage(Channel.java:1198)
    at com.mirth.connect.donkey.server.channel.SourceConnector.dispatchRawMessage(SourceConnector.java:192)
    at com.mirth.connect.server.controllers.DonkeyEngineController.dispatchRawMessage(DonkeyEngineController.java:1053)
    at com.mirth.connect.server.controllers.DonkeyMessageController.reprocessMessages(DonkeyMessageController.java:442)
    at com.mirth.connect.server.api.servlets.MessageServlet$3.run(MessageServlet.java:208)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.mail.MessagingException: Could not convert socket to TLS;
  nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1907)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:666)
    at javax.mail.Service.connect(Service.java:367)
    at javax.mail.Service.connect(Service.java:226)
    at javax.mail.Service.connect(Service.java:175)
    at javax.mail.Transport.send0(Transport.java:253)
    at javax.mail.Transport.send(Transport.java:124)
    at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1391)

我已经安装了提供的证书作为我发送到C:\ Program Files \ Java \ jre1.8.0_144 \ lib \ security \ cacerts的目的地。我还创建了一个简单的Java应用程序,它使用相同的设置和属性并成功发送消息。

似乎Mirth正在使用不同的信任库,但从我读过的3.1+使用默认值。 C:\ Program Files \ Mirth Connect \ appdata目录中没有truststore.jks。

我还能检查什么?

1 个答案:

答案 0 :(得分:1)

对于Mirth社区版(没有ssl插件):

尝试使用Java信任库。您可以直接在JAVA中管理证书。

Path \ lib \ security \ cacerts (示例:C:\ Program Files \ Java \ jre1.8.0_131 \ lib \ security \ cacerts)

仅供参考:Mirth密钥库将位于appdata下的keystore.jks中 (例如:C:\ Program Files \ Mirth Connect 342 \ appdata)