-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supabase SMTP Integration Issue with Gmail - Solution Proposal #22296
Comments
Same issue here! |
I believe I am having the same issue. Disabling "Enable Custom SMTP" appears to have fixed the issue temporarily. |
Including my Supabase logs but I doubt they are of any value. |
I found the culprit in the codebase. At least I think :). Will try to create a PR if possible. |
I have created an issue on mailme which seems to be supabases mail sending lib. It's an easy fix :) |
Hi @saschTa, thanks for the PRs - i'll look into reproducing the error and see if it fixes things. AFAIK we haven't changed anything related to the SMTP package recently so I'm quite curious why it broke for you suddenly. Just a sanity check, have you seen this guide on setting up google SMTP (https://github.com/orgs/supabase/discussions/5320#discussioncomment-7836793)? I'm wondering if this is just a configuration issue and can be fixed with better documentation. |
I am having the same issue. Tried my set up with a simple Python script and it is working okay to send the email. Can confirm that only when switching to Supabase SMTP with Gmail, the server gives 504 time out. We followed the set up from https://github.com/orgs/supabase/discussions/5320#discussioncomment-7836793 as pointed by by @kangmingtay . I can also confirm this set up was working during the week of March 11, 2024. |
I followed this guide and had auth email working until suddenly stopping this week. |
I can assure you I have checked everything in the Docs. Also the documentation that is provided has some minor issues. For why it stopped so suddenly. I assume google just enforces now the rfc standard about helo messages. Localhost is and was never the right thing to send. At the end my little test using manual smpt through openssl is a minimal reproducable step to test If localhost helo works. It does Not For me with google relay SMTP. I haven't checked if anything else is also off but in general smtp is quite simple and this was the most obvious issue I could find. Happy to help if you have issues reproducing or if the fix does not Work. |
hey everyone, we've merged @saschTa changes into the mailme package and will be testing it out with the auth service before we roll it out to all projects. |
hey @kangmingtay any update on this going live? |
I am using With the host smtp-relay.google.com, I tried to use the 465 and 587 ports with no luck. Username is set as the email address. The error I have when trying to signup a user with custom SMTP (gmail):
I am not sure I have the correct version of supabase-js or if a release is yet to be deployed. I updated to the lastest I guess this is not going to work with free accounts, only custom domains. Anyway it is working with Mailersend with a custom domain. Just to let you know. 🚀 |
Same issue with AWS SES |
Hey everyone, this has gone live recently - also, just a reminder, you can check your project's auth logs here (https://supabase.com/dashboard/project/_/logs/auth-logs) to see the underlying error returned. Not all "Error sending confirmation email" errors have the same underlying internal error. For context, @saschTa is right, we shouldn't be sending "localhost" as the hostname on the HELO command. Sending the actual hostname helps to improve deliverability and reduce the chances of your email being classified as spam. This change is also aligned with RFC 5321, which states that:
|
Bug report
Describe the bug
SMTP Service degraded
I have setup a custom smtp service (Gmail Workspace relay) with supabase projects some while ago.
All worked flawlessly but now since the last week ( 21st of March 2024) sending out magic links and verification emails are timing out.
In Discord similar issues pop up.
Auth Logs just show:
info: /magiclink | request started
EdgeAPI Logs show this response error by POST /auth/v1/magiclink:
To Reproduce
Configure gmail smtp relay service
Supabase Config
Gcloud Workspace:
Supabase Emails
Expected behavior
Emails should be sent successfully as it worked before the 21st of March.
Emails work with the exact same credential configuration using telnet or openssl
Solution Proposal
Issue
So I digged through supabase auth code and found the culprit:
localhost
!Example gmail relay with localhost:
Solution Proposal
mailme
should do something along this:
GoMail PR
There is a gomail pr that aims to fix rejects because of default localhost HELO message but I think supabase / supabase/auth should make sure to not rely on defaults here.
go mail fix pr
Additional context
I created a ticket with google as well on this issue. Trying manual telnet to the smtp relay service works fine with the same credentials provided to supabase and basic setup.
Google adviced me, that the ip of supabase instance was not blocked so something must be wrong with the implementation now of the smtp service at supabase. Which I mentioned above.
Here is a working example using openssl with the same credentials used for supabase. Just HELO message is not localhost
The text was updated successfully, but these errors were encountered: