I have a problem right now with SMTP and TLS. I have a Postfix configured on a VM and want to send mail from Keycloak installed into another VM.
I have configured the host, port and everything on keycloak but it keeps telling me that the certificate is not known.
I have generated a self-sign certificate for my email server, and imported it in the keystore :
keytool -importcert -alias smtp-10-0-7-50 -keystore /opt/keycloak/standalone/configuration/keycloak.keystore -file /home/outscale/smtpd.cert
I then restarted keycloak but it seems that the certificate is not imported
Here is the stacktrace I have :
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
I have seen in the source code that maybe you can bypass the host verification but I don’t see where I can put it in the configuration files :
Can you help me please ?