AEMaaCS - Unable to send mails trough external SMTP with SSL
I have an issue when sending out mails in AEM trough an external SMTP with SSL on AEMaaCS. On my local development environment, the mails are sent without any issues.
The error on AEMaaCS
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : proxy.tunnel:30465
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Configuration: AdvancedNetworking on the correct instance (program and environment)
"portForwards": [
{
"name": "mail.something.com",
"portDest": 465,
"portOrig": 30465
},
{
"name": "mail.something.com",
"portDest": 25,
"portOrig": 30025
}
],
"advancedNetworkingEnabled": true
Configuration: com.day.cq.mailer.DefaultMailService.cfg.json
{
"smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
"smtp.port": "30465",
"smtp.user": "$[env:EMAIL_USERNAME]",
"smtp.password": "$[secret:EMAIL_PASSWORD]",
"from.address": "no-reply@something.com",
"smtp.ssl": true,
"smtp.starttls": false,
"smtp.requiretls": false,
"debug.email": false,
"oauth.flow": false
}
I also tried to upload the certificate to the authors truststore (the mails are only sent on author)

Does anybody know how to fix this issue? Thx in advance!