# mail.status()

Canonical URL: https://developers.iagenify.com/sdk/ref/domain/mail/status/
Language: en

`domain.mail.status({ subdomain? }) → Promise<Status>`

The real state of one host, re-read from the zone: the four witnesses, and whether it is ready.

Status: re-reads the zone · free · per host

```javascript
const status = await domain.mail.status();                      // the apex
const team   = await domain.mail.status({ subdomain: "team" });

// { host, enabled, ready, mxOk, spfOk, dkimOk, dmarcOk, … }
```

## The four witnesses {#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-vs-ready}

> **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 {#re-read}

Which is what makes it useful after someone edited the zone by hand, or after a record was removed.

## For every host at once {#all-hosts}

[mail.hosts()](/sdk/ref/domain/mail/hosts) returns the same witnesses for all of them, plus how many mailboxes each has.

- [mail.hosts()](/sdk/ref/domain/mail/hosts): All of them.
- [mail.enable()](/sdk/ref/domain/mail/enable): Posing what is missing.

```python
status = domain.mail.status()                     # the apex
team = domain.mail.status(subdomain="team")

# {"host", "enabled", "ready", "mxOk", "spfOk", "dkimOk", "dmarcOk", …}
```
