*Securely* Testing Sendgrid’s SMTP Relay Service

I ran into an issue with SendGrid on a recent deploy. Oddly enough, one of their clusters stopped delivering mail right after the code push. I thought it was them but wasn’t 100% sure given our recent changes. I wanted to know if deliveries were getting back a 250 Delivery in progress (an indication that SendGrid successfully received it from us so a delivery problem must be internal to them) but I didn’t have maillog or any sysadmin-helpful information since it was on Heroku.

I needed to run a quick email test directly, without any additional layers of heroku, ruby, or rails. A quick google search pulled up this helpful support article:

http://support.sendgrid.com/entries/21249877-testing-your-connectivity-to-sendgrid-s-smtp-relay-using-telnet

Its a good article. My only complaint is that by using telnet (step 1) I would be sending my account password in the clear (base64 encoding is still cleartext).

A better way is to run the same steps using OpenSSL instead:

openssl s_client -connect smtp.sendgrid.net:465

Now your connection is encrypted and you can safely send your username and password.


comments powered by Disqus
comments powered by Disqus