But if I connect via this command:
openssl s_client -starttls smtp -crlf -connect mail.mydomain.com:587
it connects properly and I can even send emails. If the mail server was misconfigured then this command also shouldn’t work, right?
Update: On executing this command:
openssl s_client -servername mail.mydomain.com -starttls smtp -crlf -connect mail.mydomain.com:587
it returns a certificate for mydomain.com instead of the certificate for mail.mydomain.com.
Is this the misconfiguration you were talking about?
For the moment, I have configured Discourse to use this mydomain.com (instead of mail.mydomain.com) as the DISCOURSE_SMTP_ADDRESS in the app.yml file, so that the certificates match. Will this cause any problems?