Mail and webmail SSL cert invalid

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: is not in the cert’s altnames:,

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 instead of

Anyway, show the output of (replace by your domain):

echo | openssl s_client -connect -servername 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName | tr -d ' '
echo | openssl s_client -connect -servername 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName | tr -d ' '

Try using 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: is not in the cert’s altnames:,”,
host: ‘’,

Then nodemailer is not using SNI, use or 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:

code: ‘EAUTH’,
response: ‘535 Incorrect authentication data’,
responseCode: 535,
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?

That would be port 587.

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
code: ‘ETIMEDOUT’,
command: ‘CONN’

Maybe you should ask in nodemailer community.