# mail.disable()

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

`domain.mail.disable({ subdomain? }) → Promise<Result>`

Removes mail from a host — only the records we posed. The customer's own records stay, and the signing key is kept.

Status: only what we posed · the key is kept · per host

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

## Only what we posed {#ours-only}

> **A sender policy that was there before us is not ours to remove**
>
> Nor is an ownership record, nor an old mail server. Removing a customer's own records while cleaning up ours would be the worst kind of helpful.

## The signing key is kept {#key}

> **A new key makes already-sent mail unverifiable**
>
> Recipients check signatures days later. Re-enabling must find the same key — so disabling keeps it, and the response says so.

## Mailboxes stop receiving {#mailboxes}

The routing records go, so addresses on that host no longer arrive. The mailboxes themselves are not deleted — check [hosts()](/sdk/ref/domain/mail/hosts) for the count before disabling.

## It is per host {#per-host}

Disabling a subdomain leaves the apex alone, and the other way round.

## Re-enabling {#reenable}

[enable()](/sdk/ref/domain/mail/enable) poses the records again with the same key. Nothing of what was sent becomes unverifiable.

- [mail.enable()](/sdk/ref/domain/mail/enable): Turning it back on.
- [api.mail.remove()](/sdk/ref/mail/remove): Removing a mailbox.

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