# Promotions and subscriptions Separate marketing mail from personal mail. Off for every mailbox until you turn it on. For anyone who manages a mailbox. ## Prerequisites - You fully manage the mailbox. - Database migrations are applied. Until then every mailbox acts as Off. ## Turn it on Open **Settings → Inbox → Promotions** and choose a mode per mailbox. | Mode | Inbox | Promotions page | Notifications for promotions | | --- | --- | --- | --- | | Off (default) | Unchanged | Hidden | Unchanged | | Show Promotions | Unchanged, with a **Promotion** chip | Shown | Unchanged | | Move promotions out of Inbox | Promotions hidden | Shown, with unread count | Not sent (open windows still refresh) | People with read-only or send-only access can see the mode but cannot change it, move, override or trash mail. ### Sorting old mail The first time, the last 90 days are sorted in the background: 25 messages every 5 minutes, at most 2,000 a day for the whole installation. Large mailboxes take days. Settings shows progress. After three stalls in a row it stops and shows **Try again**. ## Correct a message - **Move to Promotions** or **Move to Inbox** changes one message. A move to Inbox is remembered. - Then choose **Always for ** to re-file that sender's received, unfiled mail: last 90 days, at most 500 per request. The result shows what moved; choose again to continue. Your choices always win over automatic sorting. ## Manage subscriptions Open **Subscriptions** (under **More**, or from Settings). It lists promotion senders from the last 90 days with message count, last received, read rate and unsubscribe status. Spam and Trash are not counted. | Action | Effect | | --- | --- | | **Unsubscribe** | One-click, email or web page, like in the reader | | **Unsubscribe and trash** | Unsubscribes, then trashes that sender's mail | | **Block** | A rule trashes mail from the address | | **Trash all** | Trashes the sender's unstarred, unfiled mail from the last 90 days, at most 500 per request. Shows a count first. | Trashed mail follows your normal retention period. ## How mail is classified Each new message is checked once, from headers such as `List-Unsubscribe`, `List-Id`, `Precedence`, `Feedback-ID` and known sending services (`src/lib/email/bulk-mail.ts`). Discussion lists, receipts and mail from people you have written to are not promotions. ## Search and integrations | Where | How | | --- | --- | | Search | `category:promotions`, `category:primary` | | Webhooks | `message.inbound` includes `category` (`"promotions"` or `null`) | | JMAP | Read-only keyword `$promotion` (filter with `hasKeyword`, `notKeyword`), only for mailboxes with Promotions on. The JMAP Inbox always includes promotions. | ## Database write limit D1 Free allows 100,000 row writes a day. A sorted promotion costs about 6, so the 2,000-message daily cap uses about 12,000. The day is UTC; waiting jobs continue after midnight. The 500-message limits protect the same budget. ## Troubleshooting | Problem | Cause | Fix | | --- | --- | --- | | Settings return `MIGRATION_REQUIRED` | Pending migrations | Apply them in Admin settings | | Old mail not sorted yet | Daily cap | Wait | | Sorting stopped | Three stalls | **Try again** | | Newsletter not detected | No bulk headers | Move it and choose **Always for ** | ## Related - [Spam protection](spam-protection.md)