Repository navigation
feat(email): let administrators add outbound-only custom domains - #551
Merged
Merged
Conversation
An apex whose MX belongs to Microsoft 365 or Google Workspace can now be registered with `void platform email domain-add <apex> --outbound-only`. The platform onboards only Cloudflare Email Sending and never touches the apex MX, Email Routing, catch-all or ingress Worker. - New `email_domain_routes.inbound_mode` column (managed | none), with rollback-safe compatibility entries for 1.1.11 through 1.2.1. - Outbound-only routes run sending_onboard + publish only, store inbound as disabled, and block (not verified_only) when Email Sending is refused. - A read-only Email Sending preview blocks setup with a checklist when existing DNS records conflict. - Admin only, zone apex only, never the shared mail zone. - The CLI refuses to continue when an older platform ignores the mode. Fixes #510 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://feat-email-outbound-only-void-cloud.voidzero-docs.workers.dev (commit db40c63)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Fixes #510
What it does
An admin can now register an apex whose mail lives with Microsoft 365 or Google Workspace, for sending only:
Answers to the 4 questions
email_domain_routes.inbound_mode(managed|none, defaultmanaged), plus a check thatnoneis only allowed withaddressing = 'custom'.addressingalready plays the "route kind" role, so a second kind would duplicate it.POST /email/sending/subdomains/preview. If it reports any real conflict (not just*.missing), the operation is blocked with a list (dmarc.multiple at _dmarc.brand.example; …). Once the admin fixes those records,domain-syncresumes. A domain that is already onboarded skips the preview.Safety details
catchall_detachandingress_deletefinish locally for outbound-only routes, so no Email Routing or Workers calls are made. The stored credential is still cleared, so a Sending-only token can finish removal.plan: 'refuse').blockedwould stop all sending.target.inboundMode === 'none', so an old platform that ignores the flag cannot run full managed setup.compatibility.jsonlists 1.1.11 through 1.2.1 as rollback-safe (the column is additive and defaults tomanaged).platform/meta/operations.mdwarns not to rundomain-addordomain-syncon outbound-only domains after a rollback below this release, because an older runtime would treat them as managed and take over the MX.domain-rotate-secretreturns 409 for these domains, in both the preview and the real request.Not verified live
_dmarcrecord instead of replacing it. The preview is Cloudflare's own check, but this still needs one run against a real test zone.Tests
admin-upgrade-compatibility.test.ts: 0061 upgrade from the 0060 schema, defaults, and the check constraint.email-connections.test.ts: foreign-MX apex runs 2 steps with no inbound calls; preview conflict blocks, then resumes; 403 blocks (notverified_only), then resumes; managed still falls back; 504 stays unknown; refusals; removal makes no inbound calls.operator-email-domains.test.ts: HTTP flag validation, dry-run text, blocked → sync → ready, status, previews, rotate refused, audit, remove; status-refresh race (confirmed to fail without the fix).email-admission.test.ts: sending admitted, receipt refused.operator-cli.test.ts,email-cli-domain.test.ts: flag parsing, old-server guard, owner hint.🤖 Generated with Claude Code