SendGrid needs root cert installed

AI-generated summary

A user, rockylhotka, is experiencing issues with email sending in their Discourse server hosted in Azure, using Docker. The error message indicates a problem with the server certificate for smtp.sendgrid.com. rockylhotka suspects that the issue is due to the lack of Godaddy root cert in the container. However, sam finds this strange, as the image is based on Ubuntu and SSL connections work from the server to other spots. After some troubleshooting, rockylhotka discovers that the issue might be due to using the wrong SMTP server address, sendgrid.com instead of sendgrid.net.

I am trying to set up my first discourse server, using docker and hosted in azure.

I have it running, but can’t get email to send from discourse. Looking at the production.log file in the container it appears that the problem is a lack of root cert packages in the Linux machine

Sent mail to someone@example.com (143.7ms)
Job exception: hostname "smtp.sendgrid.com" does not match the server certificate

Googling around seems to indicate the problem is that I need to install the Godaddy root cert in the container.

Does that seem correct? Why wouldn’t the standard root certs already be available?

That seems very strange, our image is based off Ubuntu, SSL connections work from the server to other spots.

We need to make SSL connections regularly to onebox links (do a search on oneboxing) do they work for you?

I don’t know that anything works, as I’ve been unable to validate my initial admin user.

You can validate it by hand if needed

./launcher enter app
rake admin:create

I’m rebuilding the container right now to not use TLS - but once it is running again I’ll try the rake command.

It may be (ok, it is) the case that I needed to use sendgrid.net rather than sendgrid.com as the smtp server :frowning: