Support custom MAIL FROM domain for SES#6906
Merged
vimtor merged 3 commits intoJun 24, 2026
Merged
Conversation
Adding support for priority property on DNS records (for MX records).
Adding suport for custom MAIL_FROM in Email component.
Adding an example where email sender is managed through domain (instead of email address).
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds support for configuring a custom MAIL FROM domain on the
aws.Emailcomponent.By default, SES sets the
Return-Path(envelope sender) toamazonses.com. Setting a custom MAIL FROM subdomain of your own sender domain:Usage
What's included
mailFromarg withdomainand optionalrejectOnMxFailure(maps to SESbehaviorOnMxFailure:REJECT_MESSAGEvsUSE_DEFAULT_VALUE);sesv2.EmailIdentityMailFromAttributesresource (whitelisted incomponent.ts);feedback-smtp.<region>.amazonses.comlooked up viagetRegionOutput) and SPF/TXT (v=spf1 include:amazonses.com ~all) DNS records;mailFromis only valid whensenderis a domain, andmailFrom.domainmust be a subdomain ofsender;transform.mailFromAttributesto customize the underlying resource.Supporting changes
Adds a
priorityfield to the shared DNSRecordinterface (applies toMXrecords). It is needed so the MAIL FROM MX record can set priority10, as suggested in the AWS docs; Each DNS provider encodes priority differently, so it's threaded through accordingly:"10 feedback-smtp.<region>.amazonses.com"), not a separate field;mxPriority, which required adding the field to the custom Go dynamic provider (pkg/server/resource/vercel-dns-record.go) in addition to the TS provideromitemptydrops it for non-MX records.Also adds a new
examples/aws-email-domainexample app demonstrating the feature.Testing
Deployed the aws-email-domain example end-to-end against all three DNS providers (AWS Route53, Cloudflare, and Vercel) and confirmed for each that:
Closes #6905