Google smtp-relay does not work as expected
Created by: topebali
Google smtp-relay does not work as expected
- Relative Priority: p2
- Deployment Type: Docker
- Sourcegraph Version: 3.39
- Impact to Customer: They are not able to use email notifications
- Slack Discussion(s): slack thread
Customer Context
The customers mood at the moment is stable.
Brief Description
This user is trying to set up email notifications using google workspace's SMTP relay.
SendTestEmail
returns the error Failed to send test email: EOF
.
I asked that he telnet from the server to the SMTP host and he got a response. So that worked. Still, he is unable to send test emails.
The following are my troubleshooting steps:
-
I checked to see if 2FA is enabled on the Google workspace account because when its enabled SMTP does not work and the customer confirmed 2FA is off.
-
I requested for logs and in the frontend we saw this error
frontend | t=2022-05-11T16:43:49+0000 lvl=warn msg="Failed to send email to inform user of access token creation" error=EOF
which originated from here, -
I told the user to create an access token on their instance and attempt again, but no dice!
-
I also confirmed that
Require SMTP Authentication
andRequire TLS encryption
in step 7 are enabled according to the SMTP relay account doc .
Steps to Reproduce
- I was able to reproduce the issue on my end and I discovered when I use “host”: “smtp-relay.gmail.com”,It throws the error the user is seeing. However when I use host”: “smtp.gmail.com” it works.
Expected Actions/Questions for Engineers
I came across this similar issue with another user. I basically followed through all the steps outlined here. Tho, I see they eventually switched to AWS and the smtp-relay issue was technically unresolved. I would definitely appreciate some leads as to what next I could be looking into or how to continue debugging further. Thanks