senapati
Documentation index

DMARC Check

DMARC tells receivers what to do with mail that fails SPF and DKIM alignment, and where to send reports. This check finds the record that applies to a domain, parses every tag, derives the policy a receiver would enforce, verifies the report destinations, and says whether the policy is strong enough for BIMI.

POST/api/dmarc-checkCosts 2 creditsAPI key

Validate a domain's DMARC record (2 credits)

Which record applies

The record is looked for at _dmarc.<domain> first. When a subdomain publishes none, RFC 9989's tree walk climbs one label at a time until a record answers; the response then has has_dmarc_record: false, inherited_from naming the organizational domain, and effective_policy set from that record's sp, which is what receivers apply to the subdomain. A record found with psd=y is a public-suffix policy, not the domain's own, and is flagged.

What DMARCbis changed

  • The Public Suffix List is gone; the organizational domain comes from the DNS tree walk described above.
  • np sets the policy for non-existent subdomains (defaulting to sp), psd marks public-suffix records, and t=y replaces sampling as the way to say "not enforced yet".
  • pct, rf and ri are deprecated. They still parse and pct below 100 is still reported as weakening the policy, with an info issue noting the deprecation.

Report destinations

Every rua and ruf address is parsed and its domain checked for MX records. A destination outside the policy domain's tree is external and must publish <policy-domain>._report._dmarc.<destination> with v=DMARC1, or receivers will not send reports there (RFC 7489 section 7.1); authorized says whether it does.

Issue codes

codetypeMeans
DMARC_NOT_FOUNDerrorNo record at the domain or above it
DUPLICATE_DMARC_RECORDSerrorMore than one record at the host; receivers ignore all
V_TAG_NOT_FOUND / V_TAG_NOT_FIRST / INVALID_V_TAGerrorv=DMARC1 missing, not first, or not exactly DMARC1
MISSING_P_TAGerror / warningNo p=: ignored, or treated as p=none when rua= is present
P_TAG_IS_NONEwarningMonitoring only; failing mail is delivered
PCT_BELOW_100warningThe policy applies to a sample of failing mail
PCT_TAG_DEPRECATED / RF_TAG_DEPRECATED / RI_TAG_DEPRECATEDinfoTags DMARCbis removed
TESTING_MODEinfot=y asks receivers not to enforce yet
INHERITED_FROM_ORG_DOMAINinfoThe record applies from a parent domain
PSD_POLICY_ONLYwarningOnly a public-suffix policy was found
RUA_TAG_INVALID_EMAIL / RUF_TAG_INVALID_EMAILerrorA report URI is not a mailto: address
RUA_TAG_EMAIL_NO_MX / RUF_TAG_EMAIL_NO_MXwarningThe report domain cannot receive mail
RUA_EXTERNAL_NOT_AUTHORIZED / RUF_EXTERNAL_NOT_AUTHORIZEDwarningAn external destination has not authorised reports
UNKNOWN_DMARC_TAG_FOUNDwarningA tag DMARC does not define
DNS_LOOKUP_FAILEDerrorA lookup did not complete; the report is partial

Malformed tag values get their own codes (INVALID_P_TAG_CHARS, INVALID_ADKIM_TAG_CHARS, INVALID_FO_TAG_CHARS and so on).

Request

JSON body
FieldTypeDescription
domain*stringDomain whose DMARC record to check

Authenticate with API key. Send it as the X-API-Key header.

curl -X POST "https://api.senapati.io/api/dmarc-check" \
  -H "X-API-Key: $SENAPATI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"github.com"}'

Response

Every success is wrapped in { "data": … } with a request_id; the fields below describe data. See Errors for the failure shape.

response: 200 OKDMARCCheckData
{
"request_id": "req_7d02a4f1",
"timestamp": "2026-10-21T09:30:12.418203+00:00",
"data": {
"domain": "github.com",
"dmarc_host": "_dmarc.github.com",
"cname_target": null,
"has_dmarc_record": true,
"dmarc_record": "v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1",
"dmarc_records_count": 1,
"inherited_from": null,
"tags": {
"v": "DMARC1",
"p": "quarantine",
"sp": "reject",
"pct": "100",
"rua": "mailto:[email protected]",
"ruf": "mailto:[email protected]",
"fo": "1"
},
"version": "DMARC1",
"domain_policy": "quarantine",
"subdomain_policy": "reject",
"non_existent_subdomain_policy": "reject",
"effective_policy": "quarantine",
"dmarc_enforced": true,
"pct": 100,
"testing_mode": false,
"psd": null,
"adkim": "r",
"aspf": "r",
"fo": "1",
"rua_emails": [
{
"email": "[email protected]",
"domain": "github.com",
"has_mx_records": true,
"external": false,
"authorized": null
}
],
"ruf_emails": [
{
"email": "[email protected]",
"domain": "github.com",
"has_mx_records": true,
"external": false,
"authorized": null
}
],
"bimi_ready": true,
"bimi_blockers": [],
"issues_found": [
{
"code": "PCT_TAG_DEPRECATED",
"type": "info",
"message": "pct= was deprecated by RFC 9989; use t=y for a testing phase"
}
],
"has_issues": true,
"valid": true,
"lookup_failed": false,
"elapsed_ms": 220
}
}

tags is the record as published; the typed fields next to it carry the derived values, so subdomain_policy is filled in from p when sp is absent.

data · DMARCCheckData
FieldTypeDescription
domain*string
dmarc_host*stringThe name queried first: _dmarc.<domain>
cname_target*string | nullWhere _dmarc.<domain> points when it is an alias
has_dmarc_record*booleanTrue when the domain itself publishes a record
dmarc_record*string | nullThe record that applies: the domain's own or an inherited one
dmarc_records_count*integerRecords found at the host that answered; more than one is an error
inherited_from*string | nullThe organizational domain whose record applies when the domain publishes none (RFC 9989 tree walk)
tags*dict<string, string>Every tag in the record, as published
version*string | null
domain_policy*string | nullp: none, quarantine or reject
subdomain_policy*string | nullsp, defaulting to p
non_existent_subdomain_policy*string | nullnp (RFC 9989), defaulting to sp
effective_policy*string | nullThe policy receivers apply to this domain: p for its own record, sp of the inherited one otherwise
dmarc_enforced*booleanTrue when p is quarantine or reject
pct*integer | nullSampling percentage when published (deprecated)
testing_mode*booleanTrue when t=y (RFC 9989)
psd*string | nullPublic suffix domain flag (RFC 9989)
adkim*string | nullDKIM alignment: r (relaxed) or s (strict)
aspf*string | nullSPF alignment: r (relaxed) or s (strict)
fo*string | nullFailure reporting options
rua_emails*ReportDestination[]Aggregate report destinations
↳ email*string | nullThe address, or the raw URI when invalid
↳ domain*string | null
↳ has_mx_records*booleanFalse means reports cannot be delivered
↳ external*boolean | nullTrue when the destination is outside the policy domain's tree
↳ authorized*boolean | nullFor external destinations: whether they publish the RFC 7489 section 7.1 authorisation record; null otherwise
ruf_emails*ReportDestination[]Failure report destinations
↳ email*string | nullThe address, or the raw URI when invalid
↳ domain*string | null
↳ has_mx_records*booleanFalse means reports cannot be delivered
↳ external*boolean | nullTrue when the destination is outside the policy domain's tree
↳ authorized*boolean | nullFor external destinations: whether they publish the RFC 7489 section 7.1 authorisation record; null otherwise
bimi_ready*booleanTrue when the policy meets BIMI's requirements
bimi_blockers*string[]What keeps bimi_ready false
issues_found*AuthIssue[]
↳ code*stringStable machine-readable code, e.g. PLUS_ALL_FOUND
↳ type*"error" | "warning" | "info"error: receivers reject or ignore the record; warning: it works but is weaker than it should be; info: a note, not a defect
↳ message*stringWhat was found and why it matters
has_issues*boolean
valid*booleanA record applies and nothing in it makes receivers ignore it
lookup_failed*booleanTrue when a DNS query did not complete; the report is partial
elapsed_msintegerdefault 0

Errors

  • 401missing or invalid API key / token
  • 402not enough credits on the account
  • 422the request body or a parameter failed validation
  • 429plan rate limit exceeded

Nested objects

data.rua_emails[] and data.ruf_emails[] · ReportDestination
FieldTypeDescription
email*string | nullThe address, or the raw URI when invalid
domain*string | null
has_mx_records*booleanFalse means reports cannot be delivered
external*boolean | nullTrue when the destination is outside the policy domain's tree
authorized*boolean | nullFor external destinations: whether they publish the RFC 7489 section 7.1 authorisation record; null otherwise
data.issues_found[] · AuthIssue
FieldTypeDescription
code*stringStable machine-readable code, e.g. PLUS_ALL_FOUND
type*"error" | "warning" | "info"error: receivers reject or ignore the record; warning: it works but is weaker than it should be; info: a note, not a defect
message*stringWhat was found and why it matters

Notes

  • dmarc_enforced is true for quarantine or reject; bimi_ready additionally needs full coverage (no sampling, no sp=none, no t=y) and lists what is missing in bimi_blockers.
  • Up to five distinct report domains are verified per record; the rest are listed without MX or authorisation checks.
  • A report with lookup_failed: true is partial; retry it before acting on it.