Repository navigation
feat(web): send our own mail straight to Amazon SES over SMTP - #668
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
The web app and GoTrue move off the mailcow relay onto SES's SMTP endpoint (the SES side, IAM user and env changes live outside this repository). - Every message names the SES configuration set from SES_CONFIGURATION_SET and carries its kind as an X-SES-MESSAGE-TAGS tag, so bounce and complaint events say which mail they were about. EmailMessage.kind is required. - The send logs SES's message id (from its 250 reply) with the kind. - The unused Resend fallback and the resend dependency are gone; production requires SMTP_HOST. - Docs: the SES setup and why GoTrue gets its configuration set from the noreply@webhooks.cc address identity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kroqdotdev
force-pushed
the
mail/direct-ses
branch
from
November 12, 2026 21:55
d06043e to
ba9f897
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves the hooks.cc family's transactional mail off the mailcow relay and onto Amazon SES's SMTP endpoint directly. The web app and GoTrue both send from
noreply@webhooks.ccwith one scoped IAM user.SES_CONFIGURATION_SET(X-SES-CONFIGURATION-SET) and carries its kind as a message tag (X-SES-MESSAGE-TAGS: kind=...). Bounce and complaint events then say which mail they were about.EmailMessage.kindis now required, and every caller names one.250 Ok <id>reply) together with the kind, so a bounce event can be matched to a send. Addresses and contents are never logged.resenddependency are gone. Production now requiresSMTP_HOST.infra/supabase/gotrue-email-auth.mddescribes the SES side, including why GoTrue gets its configuration set from thenoreply@webhooks.ccaddress identity's default (GoTrue cannot add headers). AGENTS.md records the SMTP-over-API decision.Why SMTP rather than the SESv2 API
GoTrue can only send over SMTP, so it needs a derived SMTP password whatever the app does. At about 100 messages a month, everything the API offers (config set, tags, message id, error classes) is reachable over SMTP with headers and reply codes. SMTP keeps one credential, one IAM action, one path to test and no new dependency (
@aws-sdk/client-sesv2would add about 24 packages).Rollout
The SES config set, address identity, IAM user and SNS events are set up outside this repository. The production env change (
SMTP_HOST,SMTP_USER,SMTP_PASS, andSES_CONFIGURATION_SETfor the app) is applied by hand. Deploying this PR before that change is safe: withoutSES_CONFIGURATION_SET, no SES headers are sent and mail keeps going through mailcow.Tests
pnpm test(web unit suite): 1773 passed, including a new test for the SES headers and message-id parsing.tsc --noEmitand Prettier: clean.🤖 Generated with Claude Code