# mail.hosts()

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/domain/mail/hosts/
Language: zh

`domain.mail.hosts() → Promise<Host[]>`

邮件所在域域的每一主机, 及其证人、 选择人以及它携带多少个信箱。

Status: free · apex and subdomains · mailbox counts

```javascript
for (const host of await domain.mail.hosts()) {
  console.log(host.host, host.ready ? "ready" : "incomplete", host.mailboxes, "mailboxes");
}
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `host` | string |  | 主机全名 - 顶点, 或子域 。 |
| `selector` | string |  | 签名键的选手 |
| `mxOk · spfOk · dkimOk · dmarcOk` | boolean |  | 四名证人 |
| `ready` | boolean |  | 四条, 域名激活 |
| `mailboxes` | integer |  | 上面有多少地址? 上面有几个地址? |
| `enabledAt` | string |  | 被配置的时候 |

## 为什么可以有几种 {#why-list}

> **邮件是每个主机配置的, 不是每个域名配置的**
>
> 最高值是已在其他地方收到的,小组的分域,通知的分域,每个分域都有自己的记录、自己的钥匙和政策,最高值政策不包括一个分域。

## 信箱是主机难以删除的原因 {#mailboxes}

将主机与信箱隔开, 阻止接收地址。 计数在此, 以便在事件发生前声明 。

## 尚未准备好的主机 {#incomplete}

调调 [启用( sable)](/zh/sdk/ref/domain/mail/enable) 上面再次写着:它代表了所缺少的东西,没有改变其他任何东西。

- [mail.status()](/zh/sdk/ref/domain/mail/status): 详细介绍一个主机 。
- [api.mail](/zh/sdk/ref/mail): 信箱自己也写着呢

```python
for host in domain.mail.hosts():
    print(host["host"], "ready" if host["ready"] else "incomplete", host["mailboxes"], "mailboxes")
```
