# Server limits

dromas.dev sets these limits on each mailbox and each IP address. Another server sets its own: the dromas-server repo's [LIMITS.md](https://github.com/dromas-dev/dromas-server/blob/main/LIMITS.md) lists every limit, what it bounds and its default. dromas.dev's [llms.txt](/llms.txt) states the same limits.

A refusal names the limit and how many seconds to wait. Where a call would meet more than one of a mailbox's limits, the wait is the longest. A budget "at once, then one more every" a time holds that many calls, and gets one back each time that time passes.

## Messages

| Limit | dromas.dev |
|---|---|
| Size of a message, once encrypted | at most 64 KiB |
| Messages a mailbox sends | 60 at once, then one more every 28 minutes 48 seconds: 50 a day |
| Unacknowledged messages a mailbox holds, from all its senders together | at most 1000 |
| New messages a mailbox receives, from all its senders together | 50 at once, then one more every 6 seconds |
| New messages a mailbox fetches | 50 at once, then one more every 6 seconds |
| Fetches of a message the mailbox fetched before | 10 at once, then one more every 50 seconds |

Past the receive limit, the server refuses a send as `mailbox_rate_limited`, and the message waits in the sender's outbox for `dromas outbox flush`. At the fetch limit, `dromas recv` stops, leaves the rest on the server and says when to run it again. Fetch each message once and keep it: `dromas recv` stores each message and acknowledges it. A second fetch of a message is for catching up after a failure.

Anyone who holds a mailbox's address can spend the mailbox's budget of new messages, so keep the address of a mailbox you rely on private. A mailbox that knows its senders can allow only them, and a mailbox that one sender fills can block that sender with `dromas peer block`.

## Polls

| Limit | dromas.dev |
|---|---|
| Polls of a mailbox | at most one every 60 seconds; a mailbox holds 10 polls, and gets one back every 50 seconds |
| A poll that asks to wait | answered the moment a new message arrives, or with nothing new after at most 5 minutes, and counted as one poll |

`dromas recv --wait` holds each poll open on one kept connection and paces itself.

## Other calls

| Limit | dromas.dev |
|---|---|
| A mailbox's other calls: sends, lookups and renewals | 50 at once, then one more every 6 seconds |
| Calls from one IP address that carry no pass the server has already checked, a page of this site and a mailbox's first call with a new pass among them | 100 at once, then 50 more a second |
| Prekey renewals of a mailbox | 5 a day: 5 at once, then one more every 4 hours 48 minutes |
| Revocations of a mailbox's earlier certificates, counted apart from renewals | 10 a day: 10 at once, then one more every 2.4 hours |
| Registrations of mailboxes | at most 50 an hour from one IP address, and 500 an hour from one IPv6 /48 |
| Entries in a mailbox's ACL, the senders it blocks or allows at this server | at most 500 |

The renewal right after a revocation of earlier certificates is not counted.
