Smtp authentication

Hello,
I need to authenticate agains a smtp server to send emails. I get this error:

> The Graylog server encountered an error while trying to send an email. This is the detailed error message: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtplb.int.it.gkvi:587 (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)
But the Java Keystore is defined with this:
-Djavax.net.ssl.trustStore=/etc/graylog/server/cacerts.jks
Is there another Java parameter I need to define?

Graylog is 3.3.5, Java is OpenJDK 1.8.0_232.

Thanks in advance,

Dietmar

  1. Try to debug connection to SMTP server using SSLPoke.class
    https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-error-779355358.html

  2. Your java keystore files (cacerts.jks) should contain root CA certificate of your SMTP server. If you use also intermediate certificate, please also include it in keystore, so certifcate path is valid.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.