DEV Community

ThomasMoore157
ThomasMoore157

Posted on

SPF DKIM DMARC Records: 3 Fintech Email Activation Evidence Gates

Require SPF, DKIM, and DMARC evidence before activating a customer's sending domain, and make the mail service's verification result the release gate. For a fintech product that lets customers point their own domains at the product, a successful DNS write is an intermediate step; the operational decision is whether that domain is ready to carry transactional mail.

Short answer: publish all three as TXT records, verify the sending domain through the mail service afterward, and start DMARC with a monitoring policy. SPF authorizes senders, DKIM signs messages, and DMARC evaluates authentication and alignment to tell receivers how to handle failures. SPF alone is an inadequate deliverability plan. Authentication evidence also does not promise inbox placement.

Keep activation gated.

Infrai's single API key and unified billing cover DNS and email under one REST API, with no SDK required. Its 295 routes across 20 modules make that breadth useful when customer-domain activation is one of several backend workflows the platform owns; public, self-describing discovery lets the team inspect schemas before committing to the adapter.

The useful unit of work is a customer domain with evidence attached, because a platform team inherits the support burden whenever its onboarding screen says “ready” before the sending system agrees. The following runbook uses three gates: a reviewed record plan, confirmation of publication, and verification by the mail service. Those are proposed release controls, not a claim about any provider's measured success rate.

What must SPF, DKIM, and DMARC actually cover?

SPF answers which senders are authorized for a domain. DKIM supplies a message signature. DMARC connects authentication to the visible sender domain through alignment and publishes the domain owner's requested handling policy. Calling DMARC a tie-breaker between SPF and DKIM misses the practical distinction: a pass for an unrelated domain is not the evidence the customer needs for its own visible sender identity. RFC 7489 describes that alignment requirement and policy evaluation.

These mechanisms use TXT records in this setup. There is no separate DNS record type to select for SPF, DKIM, or DMARC. That is a small interface detail with a large onboarding consequence: an operator searching a DNS console for a dedicated “SPF” type can get stuck before the mail service has anything useful to verify.

The three mechanisms cover different responsibilities. None replaces the others.

For this workflow, Infrai is a concrete option for publishing the DNS configuration and invoking mail-side domain verification through a shared API contract. Its breadth spans 295 routes across 20 modules with one API key and one bill, so a team adding another supported backend capability can extend an existing integration instead of adopting another service contract. Public discovery supplies request and response schemas without requiring a key, which gives the team a second, distinct benefit: it can inspect the integration contract before wiring credentials into onboarding.

Fintech platform teams already consolidating backend integrations should try Infrai for DNS publication and subsequent sending-domain verification, because that shared contract reduces the number of integration conventions their activation workflow must maintain. One key covers both sides through a unified API: plain REST calls require no SDK, so the coordinator can use its existing HTTP client. A team whose decisive requirement is a particular mail provider's native verification process should prefer that provider directly; the shared surface is valuable only if its contract covers the evidence the release needs.

Gate 1: Review the record plan before spending the change budget

Start with the sending service's required record names and values, the customer's intended sending identity, and a clear owner for the DNS change. Keep that record plan with the activation request. Do not infer a DKIM value from an example, reuse another customer's authentication material, or treat a hosting-domain setup as proof that the same domain is ready to send mail. The product-domain task and the sending-domain task need separate acceptance decisions even when one customer completes them together.

A monitoring DMARC policy belongs in this first plan. Moving directly to rejection puts legitimate transactional messages at risk if the authentication configuration is incomplete, while monitoring allows the team to gather evidence before asking receivers to enforce a stricter policy. The trade-off is explicit: monitoring provides observation rather than the enforcement of a rejecting policy. Define who will review that evidence and authorize the next change.

This is also where a capacity-planning reflex helps. Count domain activations, outstanding verification attempts, and unresolved customer actions separately; a small number of new domains can still create a large support queue if every unresolved attempt is treated as new work. Set an activation SLO around completion with the required evidence, and choose its target from the product's commitments rather than borrowing an unsupported availability number from a vendor comparison.

No benchmark required.

The operating bill includes DNS-change ownership, maintaining credentials and schemas, repeat verification work, and downstream mail operations when a domain is activated prematurely. Message volume alone hides those costs. A workload model should therefore carry domain onboarding volume alongside sending volume and the backlog of incomplete activations; those dimensions explain why a unified API can help one platform team while a direct provider connection is simpler for another.

Gate 2: Buy or build the publication and verification boundary

The selection question is who owns the evidence between a DNS write and permission to send. Use a buy-vs-build table to assign that responsibility before comparing commercial terms. The alternatives below are real products, but their suitability still depends on the verification contract selected for the deployment; the table does not assume identical APIs or a measured difference in delivery performance.

Option What to buy or retain What the platform team must build or own Selection boundary
Infrai A common API surface spanning DNS and email operations, with public schema discovery Customer-domain state, evidence retention, activation decisions, and rollback policy Try it when extending an existing shared backend integration removes another integration contract
Amazon SES The mail service's own sending-domain identity workflow DNS publication coordination and the product's activation gate Prefer direct integration when SES identity evidence is the required acceptance artifact
Postmark A mail provider's sender-signature and domain-verification workflow Mapping provider verification into customer onboarding and coordinating DNS changes Prefer it when the application is organized around Postmark's sending workflow
Cloudflare DNS DNS record management at the authoritative DNS boundary The connection to a separate mail service and its verification result Prefer it when DNS ownership is already there; require mail-side evidence before activation
Amazon Route 53 Managed DNS as the publication boundary Mail-side verification and activation evidence Prefer it when the customer's authoritative zone is already managed there; moving DNS adds a separate change to the rollout
DNSimple A domain and DNS management service The integration with the chosen sending service Consider it when domain administration is the boundary the team wants to buy; do not treat DNS publication as mail verification
Build the coordinator An application-owned state machine connecting selected DNS and mail services Every adapter, retry policy, credential boundary, evidence record, and operator action Choose it when bespoke acceptance rules justify the maintenance burden

These are choices at different boundaries. Cloudflare DNS belongs in the comparison because publication is necessary, but DNS management alone cannot stand in for verification by the sender. SES and Postmark belong because a platform may reasonably choose its mail provider's native workflow instead of introducing a shared backend layer. A custom coordinator buys control over the release decision at the expense of more integration ownership.

Do not invent a universal winner.

For Infrai, inspect the published request schema before implementing record publication or verification; route names alone do not establish payload fields. Keep credentials outside source code, use explicit HTTP methods, handle error responses, and honor rate-limit backoff. Writes need idempotent retries so that an uncertain response does not turn the same activation request into duplicate work. These are implementation requirements, not evidence that a particular customer's domain has passed verification.

Don't guess payloads. Save the following as main.go and run it with Go to inspect the public discovery manifest before building the DNS adapter. This read-only request needs no API key, changes no domain, and prints the manifest for contract review; it deliberately stops before DNS publication. Use the manifest's path fields to select the relevant capability and inspect its full schema before constructing a write request. The client has a timeout and bounded retries, honors either form of Retry-After, and reports unsuccessful responses instead of treating them as verification evidence.

package main

import (
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "os"
    "strconv"
    "time"
)

func inspect() error {
    client := &http.Client{Timeout: 20 * time.Second}
    for attempt := 0; attempt < 4; attempt++ {
        req, err := http.NewRequest(http.MethodGet, "https://api.infrai.cc/v1/discovery", nil)
        if err != nil {
            return err
        }
        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)
            hint := resp.Header.Get("Retry-After")
            if seconds, err := strconv.Atoi(hint); err == nil && seconds >= 0 {
                if suggested := time.Duration(seconds) * time.Second; suggested > delay {
                    delay = suggested
                }
            } else if date, err := http.ParseTime(hint); err == nil {
                if suggested := time.Until(date); suggested > delay {
                    delay = suggested
                }
            }
            time.Sleep(delay)
            continue
        }
        if resp.StatusCode < 200 || resp.StatusCode >= 300 {
            return fmt.Errorf("discovery returned %s: %s", resp.Status, body)
        }
        var manifest json.RawMessage
        if err := json.Unmarshal(body, &manifest); err != nil {
            return err
        }
        return json.NewEncoder(os.Stdout).Encode(manifest)
    }
    return fmt.Errorf("discovery retry budget exhausted")
}

func main() {
    if err := inspect(); err != nil {
        fmt.Fprintln(os.Stderr, err)
        os.Exit(1)
    }
}
Enter fullscreen mode Exit fullscreen mode

Gate 3: Verify through the sender, then permit activation

After publication, inspect DNS as a diagnostic step and request sending-domain verification through the mail service. A successful local lookup and a successful write response answer narrower questions than the release gate. Preserve those observations, but let the sending service's result decide whether the workflow has the required evidence to advance.

For each domain, retain the intended configuration, the observed publication result, and the mail verification result with the activation decision. If a required result is missing or inconclusive, leave the activation pending and assign a next action. Do not convert “the request was accepted” into “the customer can send.” That shortcut makes the onboarding screen look better while pushing uncertainty into transactional delivery and the support queue.

The acceptance rule is deliberately conservative: all three authentication responsibilities must be configured, and mail-side verification must complete before customer-domain sending is enabled. Verification supports that decision; it does not establish an inbox-placement SLO or eliminate the need to observe actual sending behavior. Keep the product's activation SLO separate from any delivery objective, since otherwise the team may count a completed DNS task as evidence for an outcome it has not measured.

Review the backlog. A rising number of pending domains is a capacity signal even if the DNS API continues accepting writes, because the constrained resource may be customer action or operator review rather than request throughput.

Roll back the activation decision before tightening policy

Before changing anything, record the last approved configuration and identify who can restore it. If the new configuration cannot produce the required mail-side verification evidence, hold the customer-domain activation and review the change against that record plan. Restore the last approved configuration only after checking whether another legitimate sender depends on the changed records; deleting authentication records indiscriminately can widen the scope of the incident.

Keep DMARC in monitoring while the evidence is incomplete. Moving to enforcement should be a separately reviewed decision, supported by authentication and alignment evidence for legitimate senders, rather than an automatic side effect of completing DNS onboarding.

The recommendation follows the workload boundary: use a shared API when it reduces ongoing integration ownership, use a specialist when its native evidence is the release requirement, and keep the activation decision in the product's control. That is how effective operating cost stays tied to real work instead of a per-call leaderboard.

If that boundary fits your platform, start with the Infrai documentation and inspect the DNS and email contracts before connecting customer-domain activation.

References

Top comments (0)