I have generated the cert by navigating to Mail > Domain > Checked SSL and letsencrypt
Despite that when I try to use nodemailer it outputs this error:
Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate’s altnames: Host: webmail.example.com. is not in the cert’s altnames: DNS:example.com, DNS:www.example.com
And to confirm if I have read on other posts, yes I have and no solution would do it in my case.
You should use
mail.example.com instead of
Anyway, show the output of (replace
example.com by your domain):
echo | openssl s_client -connect webmail.example.com:465 -servername webmail.example.com 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName | tr -d ' '
echo | openssl s_client -connect mail.example.com:465 -servername mail.example.com 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName | tr -d ' '
Try using hostname.domain.com instead …
Ok, then, as I said, use
Still the same error despite changing from webmail to mail. Here is another part of the error i get a bit further down.
reason: “Host: mail.example.com. is not in the cert’s altnames: DNS:example.com, DNS:www.example.com”,
Then nodemailer is not using SNI, use
www.example.com or as @eris said, use the hostname of your server.
You are indeed onto something here, but now I am facing that the auth is incorrect:
response: ‘535 Incorrect authentication data’,
command: ‘AUTH PLAIN’
Despite I know I am using a valid email which would be [email protected] and I am trying to use the same password that I would use for logging in to Roundcube.
Which port are you using?
And nodemailer is using starttls? If you want to use a direct TLS connection, use port 465
That got it further, but now it is complaining about not receiving a greeting.
Error: Greeting never received
Maybe you should ask in nodemailer community.