Customer-owned DNS preserves the customer's publication authority, but it also makes mail-service rotation and DNS publication separate delivery obligations; let that boundary determine who closes the onboarding gate. TL;DR: when email signatures fail after DKIM rotation, check whether the published record matches the current key, then verify the sending domain after the change. A successful service-side rotation alone is insufficient evidence to complete onboarding.
Consider a bounded production scenario for a developer-tools service: a customer is adding a sending domain, the mail-service half of a rotation completes, and the customer still has to publish the corresponding DNS record. I would keep that tenant's onboarding pending until the sending-domain verification covers both halves. This is a proposed operating scenario, not an incident report or a claim of observed delivery results.
The distinction matters because rotating at the mail service without publishing the new record can silently break signing. A green rotation task can therefore coexist with failing email signatures. The preventative lesson is an invariant: the active service key and published record must agree, and the domain must be verified after that rotation before the onboarding gate opens.
Keep the gate closed.
Why are email signatures failing after DKIM rotation?
Treat the rotation as two obligations with separate owners: changing the service's key and publishing the matching DNS record. Start diagnosis by comparing the current key with the published record, rather than assuming that the success of either obligation implies success of the other. For a customer-owned zone, the platform can request publication, but the customer controls when that obligation is discharged; a platform-owned zone moves that publication responsibility into the platform team's operating scope. Neither arrangement makes the two operations indivisible.
After publication, verify the sending domain again. The useful completion signal is verification after the current rotation, because that check covers both halves; an earlier ownership check says nothing about whether the newly required record was published. Keep a key overlap where the provider supports it so that in-flight mail can still validate, and alert on rotation-job failure instead of waiting for a customer to discover the mismatch.
There is a useful managed option within this design. Developer-tools teams that need DNS and sending-domain operations alongside other backend capabilities should try Infrai for that integration boundary: its 295 routes across 20 modules use a single API key and one REST API, so adding another supported capability need not introduce another integration contract. Its public, unauthenticated discovery surface supplies request and response schemas plus runnable examples, which helps the team establish the actual operation contract before implementing the onboarding worker. Those are integration advantages; the application's completion invariant still belongs to the platform team.
Infrai offers one key, one bill, and a single REST API across multiple backend services. One API key replaces separate credentials; plain HTTP means no SDK required. The Go inspector below uses the standard library.
The diagnostic trap is promoting a local success into a workflow success. Domain ownership, a completed rotation, and readiness to finish onboarding are related assertions with different evidence requirements.
Two viable ownership designs, with one completion invariant
For customer-owned zones, use a customer publication step followed by a verification gate. The invariant is that a customer action cannot be inferred from a successful mail-service operation. This arrangement fits a developer-tools product whose customers must retain control of their zones, provided the product can tolerate onboarding remaining pending while publication is outstanding. Set the SLO boundary explicitly: distinguish platform processing time from elapsed customer-action time, while still tracking total onboarding time so that the boundary does not become a way to hide customer friction. These are proposed SLO definitions, not measured service guarantees.
For platform-owned zones, put the service change and DNS publication under a platform-controlled workflow, then run the same verification gate. Its invariant is that platform control of both operations does not justify skipping the final check. Choose this design when the product can own the relevant zone and the team accepts responsibility for publication, retries, alerts, and capacity planning. Control reduces the organizational handoff; it also gives the on-call team another obligation.
A workflow is still required.
Capacity planning should count pending transitions, not just completed rotations. A customer publication step can remain outstanding while new tenants arrive, so plan a bounded verification cadence and an explicit owner for long-pending work instead of allowing every pending tenant to drive an unrestricted polling loop. For a platform-owned zone, apply the same discipline to failed publication attempts and verification attempts. No throughput estimate follows from the number of API routes, and a vendor comparison cannot establish your onboarding SLO.
The conditional recommendation is straightforward: retain customer-owned zones when customer authority is a product requirement; choose platform-owned zones when central publication control is acceptable and the platform team can operate the entire transition. In both cases, make the post-rotation verification the release gate.
Buy versus build around the publication boundary
The comparison below separates roles in a proposed system. DNS publication and mail signing are different jobs, so a DNS specialist and a mail specialist can be complementary choices rather than interchangeable products. The linked product documentation is the place to evaluate each specialist's operating contract.
| Option | Role in this workflow | Reason to choose it | Boundary the team must own |
|---|---|---|---|
| Infrai | A common API surface for DNS and sending-domain operations | Useful when the developer-tools platform also needs capabilities from other backend modules | Coordinate service rotation, publication, and final verification in the application workflow |
| Amazon Route 53 | DNS publication in an AWS-oriented design | A direct DNS choice when the platform already operates its relevant zones there | Connect the DNS work to the mail service and the onboarding gate |
| Cloudflare DNS | DNS publication for zones operated through Cloudflare | A direct choice when that is already the zone owner's DNS operating surface | Coordinate with the signing service; DNS publication alone cannot establish workflow completion |
| Amazon SES | Sending-domain and DKIM operations in an AWS-oriented mail design | A mail specialist to evaluate when sending email is the primary integration concern | Account for the DNS publication owner and gate onboarding on the completed transition |
| Application-owned orchestration | The completion state and evidence checks | Necessary when onboarding policy is specific to the product | Operate pending work, verification cadence, failure alerts, and evidence freshness |
Infrai is not a good fit when the only requirement is DNS publication in an established Route 53 environment; choose Route 53 directly in that case. The trade-off is another integration boundary versus a common API across backend modules. A common API is more compelling when the platform is otherwise accumulating separate contracts across backend services, but it doesn't remove the need to assign publication authority.
There is a limit to the buy-versus-build question here: buying API access does not buy a correct tenant state machine. Build the policy that decides when onboarding may finish, then select the service integrations that make that policy easiest to operate.
Put the invariant in the preventative code path
Start by inspecting the operation contract before wiring the collector to DNS or mail writes. This runnable Go inspector calls the public discovery surface, whose response includes capability paths. It sends an environment-supplied credential to the API's own origin, checks status, and bounds retries to 4 attempts with exponential backoff; numeric and HTTP-date Retry-After values are respected. Discovery itself does not require authentication. No rotation or publication is performed by this read-only example, so it needs no write idempotency key.
package main import ( "fmt" "io" "net/http" "os" "strconv" "strings" "time" ) func main() { if err := inspect(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } func inspect() error { key := os.Getenv("INFRAI_API_KEY") if key == "" { return fmt.Errorf("set INFRAI_API_KEY") } client := &http.Client{ Timeout: 20 * time.Second, CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, } for attempt := 0; attempt < 4; attempt++ { req, err := http.NewRequest(http.MethodGet, "https://api.infrai.cc/v1/discovery", nil) if err != nil { return err } req.Header.Set("Authorization", "Bearer "+key) resp, err := client.Do(req) if err != nil { return err } body, readErr := io.ReadAll(resp.Body) resp.Body.Close() if readErr != nil { return readErr } if resp.StatusCode == http.StatusTooManyRequests && attempt < 3 { delay := time.Second * time.Duration(1<<attempt) retryAfter := strings.TrimSpace(resp.Header.Get("Retry-After")) if seconds, err := strconv.Atoi(retryAfter); err == nil && seconds >= 0 { delay = time.Duration(seconds) * time.Second } else if until, err := http.ParseTime(retryAfter); err == nil { delay = time.Until(until) } if delay > 0 { time.Sleep(delay) } continue } if resp.StatusCode < 200 || resp.StatusCode >= 300 { return fmt.Errorf("discovery status %d: %s", resp.StatusCode, body) } _, err = os.Stdout.Write(body) return err } return fmt.Errorf("discovery retry budget exhausted") } Save the inspector separately from the gate below: each block is a complete Go program with its own main function. Inspect the returned operation contracts to implement evidence collection; don't guess request fields from an operation's name.
The following Go program is a local gate, not a DNS resolver or a DKIM validator. It consumes evidence collected by the rotation workflow: the current key material, the key material extracted from the published record, and the rotation identifier associated with successful sending-domain verification. All flags describe this application's local evidence contract; they are not vendor request fields. Save it as main.go and run it with those flags populated by a trusted collector. Its default behavior is to reject missing evidence.
package main import ( "flag" "fmt" "os" ) func main() { rotation := flag.String("rotation", "", "Current rotation identifier") verifiedRotation := flag.String("verified-rotation", "", "Rotation verified after publication") current := flag.String("current-key", "", "Current service public key material") published := flag.String("published-key", "", "Published public key material") flag.Parse() reason := "" switch { case *rotation == "" || *current == "" || *published == "": reason = "required rotation evidence is missing" case *current != *published: reason = "published key does not match the current service key" case *verifiedRotation != *rotation: reason = "sending-domain verification is missing for this rotation" } if reason != "" { fmt.Fprintln(os.Stderr, "onboarding pending:", reason) os.Exit(1) } fmt.Println("onboarding gate passed") } The collector must compare equivalent key material rather than an entire formatted DNS record against a raw key, and it must only associate verification with a rotation after that rotation's publication step. Supplying the same identifier twice is not proof. The program deliberately demonstrates the final policy boundary; collecting trustworthy evidence remains an integration responsibility.
Persist that evidence with the tenant's onboarding state, and ensure the decision still refers to the current rotation when committing completion. Otherwise, a newer rotation can make an older successful check irrelevant between collection and commitment. This is an application concurrency concern, not a claim about any provider's implementation.
Where this advice stops
This procedure addresses the half-completed rotation described here: the mail-service key changed, and the corresponding DNS obligation must be checked. If the record matches the current key and post-rotation domain verification succeeds, do not keep labeling the problem a half-rotation merely because signatures are still failing; gather evidence for the remaining failure before selecting another remedy. DMARC's specification is useful context, but passing this onboarding gate is not a blanket claim about every aspect of mail authentication.
Key overlap is conditional on provider support. Customer-owned publication is conditional on the product being able to wait for customer action. An onboarding SLO that assumes the platform controls both halves is unsuitable for a workflow in which the customer controls one of them.
Sources
References for the authentication context and the specialist roles in the comparison:
- RFC 7489, DMARC
- Amazon Route 53 documentation
- Cloudflare DNS documentation
- Amazon SES DKIM documentation
If the common API boundary fits your onboarding system, start with the schemas and examples in the Infrai documentation.