const status = await domain.mail.status(); // the apex
const team = await domain.mail.status({ subdomain: "team" });
// { host, enabled, ready, mxOk, spfOk, dkimOk, dmarcOk, … }status = domain.mail.status() # the apex
team = domain.mail.status(subdomain="team")
# {"host", "enabled", "ready", "mxOk", "spfOk", "dkimOk", "dmarcOk", …}The four witnesses
| Field | True when the zone holds |
|---|---|
mxOk | the routing records |
spfOk | the record saying who may send |
dkimOk | the signing key |
dmarcOk | the alignment policy |
ready is all four, plus the domain being active. It is the one flag worth showing.
enabled and ready are different
Enabled means we configured it; ready means it works
A host can be enabled while the domain is still pending, or while a record did not land. Showing enabled as « mail works » is how a customer finds out otherwise from a missing message.
It reads the zone, not a record of it
Which is what makes it useful after someone edited the zone by hand, or after a record was removed.
For every host at once
mail.hosts() returns the same witnesses for all of them, plus how many mailboxes each has.