for (const host of await domain.mail.hosts()) {
console.log(host.host, host.ready ? "ready" : "incomplete", host.mailboxes, "mailboxes");
}for host in domain.mail.hosts():
print(host["host"], "ready" if host["ready"] else "incomplete", host["mailboxes"], "mailboxes")hoststringThe full hostname — the apex, or a subdomain.
selectorstringThe signing key's selector.
mxOk · spfOk · dkimOk · dmarcOkbooleanThe four witnesses.
readybooleanAll four, and the domain active.
mailboxesintegerHow many addresses exist on it.
enabledAtstringWhen it was configured.
Why there can be several
An apex that already receives elsewhere, a subdomain for the team, another for notifications — each has its own records, its own key and its own policy. A policy on the apex does not cover a subdomain.
mailboxes is what makes a host hard to remove
Disabling a host with mailboxes on it stops those addresses receiving. The count is here so that can be said before it happens.
A host that is not ready
Call enable() again on it: it poses what is missing and changes nothing else.