Documentation

Sender domains and DNS

Create and verify outbound sender domains, inspect SPF, DKIM, DMARC, and return-path record status, and know what the domain status fields mean.

Search Docs

StackShift Mail

Sender domains and DNS

Live

Create and verify outbound sender domains, inspect SPF, DKIM, DMARC, and return-path record status, and know what the domain status fields mean.

Goal

Move a domain from pending to verified before using it as a production sender.

Current status

Live

This area is documented as current, user-reliable behavior.

Workflow

  1. 1Create the sender domain with /mail/domains or the SDK.
  2. 2Publish every required DNS record returned by StackShift.
  3. 3Run verify after DNS propagation.
  4. 4Use the domain only after the aggregate status is verified.

Domain API

Example

ts
const domain = await stackshift.mail.domains.create('example.com')

for (const record of domain.records ?? []) {
  console.log(record.type, record.name, record.value, record.status, record.required)
}

const checked = await stackshift.mail.domains.verify(domain.id)
console.log(checked.status, checked.spfStatus, checked.dkimStatus, checked.dmarcStatus, checked.returnPathStatus)

Status fields

  • domain.status is pending, verified, failed, or disabled.
  • spfStatus, dkimStatus, dmarcStatus, and returnPathStatus are missing, pending, verified, or failed.
  • records contains DNS records with type, name, value, status, required, and optional explanation.
  • Deleting a domain removes it from the StackShift sender-domain registry. It does not delete DNS records at your DNS provider.

Record types currently surfaced

  • TXT records are used for SPF or DMARC-style policy data.
  • CNAME records are used for delegated verification or return-path style routing.
  • MX records are used where mail routing requires them, especially inbound domain workflows.

Expected result

The sender domain has status verified and individual SPF, DKIM, DMARC, and return-path checks are not missing or failed.

Common failures

  • TXT or CNAME records were copied with the wrong host/name value.
  • DNS propagation has not completed when verify is run.
  • The domain remains failed or pending because one required record is missing.