Repository navigation
fix(resend): recognize Resend's new receiving MX host (forge.rmta.net) - #323
Merged
Merged
Conversation
Resend now returns the inbound MX as receive-<region>.forge.rmta.net (record: "Receiving"), which isInboundSmtpMx does not match, so setupResendReceiving failed with "Resend did not return a receiving MX record for this domain." and the webhook was never created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/lib/domains/resend-receiving.ts
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.
Problem
Setting up Resend receiving fails with:
Resend now returns the inbound MX with a new host that
isInboundSmtpMx(SES-styleinbound-smtp.<region>.amazonaws.com) does not match.GET /domains/:idfor a domain insa-east-1:{"record":"Receiving","name":"","value":"receive-sae1.forge.rmta.net","type":"MX","priority":4,"status":"verified"}Because
inboundMx()finds nothing,setupResendReceivingthrows beforeensureWebhook, so theemail.receivedwebhook is never created and inbound mail never reaches Mailflare.Fix
isResendInboundMxinreceiving-dns.ts: the existing SES-style host orreceive-<region>.forge.rmta.net.inboundMx()also accepts the MX Resend labelsrecord: "Receiving", so a future host change doesn't break setup again.isResendInboundMxfor the status fallback (hasMxMatching) and forremoveResendReceiving, so the MX is detected and cleaned up for Cloudflare-managed zones too.isInboundSmtpMxunchanged.Testing
Self-hosted Docker + Resend (send and receive), manual DNS zone:
POST /api/domains/:id/receiving/resend→Resend did not return a receiving MX record….{"ok":true}; Resend logs showPOST /webhooks201 andPOST /domains/:id/verify200; the domain panel shows every receiving step green; inbound and outbound mail work end to end.Lint and the test suite were not run locally.
Supersedes #296, which targeted the same bug but was closed with a large unrelated diff; this PR changes only the two files above.
🤖 Generated with Claude Code