# Mail

keel.run hosts mailboxes for your own domains: IMAP, JMAP, POP3 and SMTP for every mail client, a webmail you sign in to with your keel account, aliases, catch-alls, forwarding, mailing lists, spam and virus filtering. Everything runs on keel's own mail servers in Germany; nobody at keel reads your mail, and no API – also not the one for agents – returns message content.

Apps on keel.run can send mail too, with sending keys, and receive mail as webhooks: see [App mail](/docs/mail-sending).

## Add a domain

```bash
keel mail domains add example.de          # shows the records to create
keel mail domains dns example.de --watch  # checks every 30 s until the domain is active
```

In the dashboard: **Mail → Domains → Add domain**.

**If the domain's zone is in [keel DNS](/docs/dns)** (same workspace), the domain is verified at once and keel writes every record itself as managed records (`managed_by: mail:mdom_…`). Nothing else to do: DKIM keys rotate, MTA-STS changes and new hosts all happen without you. If one of your own records blocks a managed one (for example an old MX), the domain shows a conflict with a hint.

**Otherwise** create these records at your DNS provider (the dashboard and `keel mail domains dns` show the exact values with copy buttons):

| Purpose | Name | Type | Value |
|---|---|---|---|
| Verification | `_keel-mail` | TXT | `keel-verify=…` |
| Receiving | `@` | MX | `10 mx1.mail.keel.run.` and `10 mx2.mail.keel.run.` |
| SPF | `@` | TXT | `v=spf1 include:_spf.mail.keel.run -all` (merge into an existing SPF record, never add a second one) |
| DKIM | `keel-e1._domainkey`, `keel-e2._domainkey`, `keel-r1._domainkey`, `keel-r2._domainkey` | CNAME | `e1.<id>.dkim.mail.keel.run.` … |
| DMARC (recommended) | `_dmarc` | TXT | `v=DMARC1; p=quarantine; …` |
| MTA-STS, TLS reporting, autoconfig (recommended) | `_mta-sts`, `mta-sts`, `_smtp._tls`, `autoconfig`, `autodiscover`, SRV records | | as shown |

The DKIM records are CNAMEs: keel rotates the keys every 6 months without any change on your side. keel checks the records every 6 hours; **Check now** (or `keel mail domains verify example.de`) checks at once. Each record gets a status (`ok`, `missing`, `wrong`, `conflict`) and a hint for the problem, for example "a second SPF record was found – only one is allowed".

An unverified domain can be taken over by another workspace after 24 hours; a verified one never.

## Mailboxes

```bash
keel mail mailbox create hallo@example.de --quota 10G --owner me
keel mail app-password create hallo@example.de --name iphone   # shown once
```

- A mailbox costs **€1.50 per month and includes 5 GB**. The storage is pooled: 5 GB × your mailboxes are included for the whole workspace, beyond that €0.10 per GB and month.
- The **owner** (a member of the workspace) signs in to the webmail with their keel account. People without other rights get the workspace role `mail`: they see only their own mailboxes, create app passwords and set forwarding.
- **App passwords** are what mail clients use (`kmp_…`, 24 random characters, shown once). Give each device its own, with scope `all`, `smtp-only` or `read-only`; revoking one ends its open sessions within seconds. Mailbox passwords chosen by people are off by default (workspace setting) because protocols like IMAP cannot do two-factor authentication.
- **Options:** "File a copy of sent mail in Sent" (for clients that do not save sent mail themselves – most do, so it is off) and "POP3 deletes for good" (off: mail a POP3 client deletes goes to Trash).
- Deleting a mailbox refuses its mail at once; its contents stay recoverable for 30 days.

### Mail clients

Most clients set themselves up from the address (autoconfig, autodiscover and SRV records). Otherwise:

| Protocol | Server | Port |
|---|---|---|
| IMAP | `imap.mail.keel.run` | 993 (TLS) |
| SMTP | `smtp.mail.keel.run` | 465 (TLS) or 587 (STARTTLS) |
| POP3 | `pop.mail.keel.run` | 995 (TLS) |
| JMAP | `https://jmap.mail.keel.run/.well-known/jmap` | 443 |
| ManageSieve | `sieve.mail.keel.run` | 4190 |

The user name is always the full address, the password an app password.

### Webmail

The webmail runs at `mail.keel.run`: sign in with your keel account (including passkeys and two-factor authentication) and every mailbox you own appears – no password is stored in the webmail. **Mail → Open webmail** in the dashboard links there.

## Aliases, catch-all, forwarding, lists

```bash
keel mail alias add info@example.de --to hallo@example.de --send-as hallo@example.de
keel mail catchall set example.de --to hallo@example.de
keel mail forward set hallo@example.de --to privat@example.com --no-copy
```

- An alias delivers to up to 50 addresses (mailboxes, other aliases, external addresses); `--send-as` lets mailboxes send with it.
- The **catch-all** (`*@example.de`) receives mail for every address without a mailbox, alias, list or route. Catch-alls attract spam, so their mail is filtered more strictly.
- **Subaddressing** is on by default: `hallo+news@example.de` arrives at `hallo@`.
- **Forwarding** to external addresses is rewritten with SRS and ARC-sealed, so SPF and DMARC still pass. Spam is never forwarded. Every change is audited and mailed to the mailbox owner – a quietly added forward is a typical sign of a taken-over account.
- **Mailing lists** send a new message to each member with `List-Id` headers; who may write is `members`, `domain`, `anyone` or `moderated`.

## Spam, viruses and quarantine

Incoming mail is checked during the SMTP session: SPF, DKIM, DMARC and ARC, keel's own reputation across all workspaces, content scoring and a virus scan. Mail is refused rather than bounced, so keel never sends backscatter.

- From the **junk score** (default 6) mail goes to Junk; from the **quarantine score** (default 10) it is held in quarantine; from 15 it is refused. Change both under **Mail → Settings**.
- Executable attachments are refused (or quarantined, per setting); Office documents with macros are quarantined.
- Quarantined mail is kept for 30 days. Owners and admins see the sender's domain, size, score and the reason – never the subject – and can release (`keel mail quarantine release qmsg_…`) or delete it. Moving mail between Inbox and Junk in a client trains the filter for your workspace.

## Limits and deliverability

| Limit | Hobby | Pro |
|---|---|---|
| Mail domains | 5 | 50 |
| Mailboxes | 25 | 250 |
| Aliases (incl. catch-alls) | 200 | 2000 |
| Mailing lists / members per list | 5 / 500 | 50 / 5000 |
| External recipients per day (all mailboxes) | 1000 | 10000 |
| External recipients per hour and mailbox | 100 | 300 |
| Recipients per message | 50 | 100 |
| Largest message sent | 25 MB | 50 MB |
| Largest mailbox | 20480 MB | 102400 MB |

Incoming messages may be up to 50 MB. New workspaces send to at most 50 external recipients per day for their first 14 days. A downgrade is refused while the workspace has more mail domains, mailboxes or aliases than the target plan allows (`keel billing plans` lists what to reduce).

keel computes a sending reputation for every workspace from hard bounces, complaints and outbound spam (**Mail → Reputation & limits**, `keel mail reputation`). Above the thresholds keel slows sending down or pauses it. A mailbox that looks compromised (new location plus unusual sending, many new recipients, a sudden external forward) gets a **sending hold**: only its sending stops, its app passwords are revoked, and the owners and the mailbox owner get an e-mail. Release it after creating new app passwords. Sending spam, phishing or bulk marketing mail breaks the [terms](/legal/agb) and leads to suspension.

## Billing suspension

A workspace suspended for billing keeps **receiving mail for 30 days** – lost mail hurts more than a few days of storage – but logins and sending are refused with a clear message. After 30 days the mail servers answer "try again later", after 60 days they refuse mail. Data is kept until the workspace is closed.

## API, CLI and agents

Everything above works through the API (`/v1/workspaces/{id}/mail/…`, `/v1/mail/…`, `/v1/mailboxes/…`, scopes `mail:read` and `mail:write`), the CLI (`keel mail --help`) and the [MCP tools](/docs/agents) (`list_mail_domains`, `create_mailbox`, …). There is deliberately no tool that sends or reads mail and none that hands out mailbox credentials.
