[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109948":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":32,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":36,"discoverSource":37},109948,"irisproject","Urdemonlord\u002Firisproject","Urdemonlord","IRIS is a self-hosted webmail platform with permanent mailboxes, anonymous 1-hour temp inboxes, and a transactional email API. HTML mail renders on a separate origin behind one-time tokens.","mail.meowlabs.id",null,"Rust",61,6,51,0,2,10,1,44.54,"Apache License 2.0",false,"main",true,[25,26,27,28,29,30,31],"email","jmap","rust","self-hosted","stalwart","typescript","webmail","2026-11-14 20:00:10","2026-11-21 09:37:01","\u003Cp align=\"left\">\n  \u003Cimg src=\"docs\u002Fassets\u002Firis-logo.svg\" alt=\"IRIS — self-hosted webmail\" width=\"360\">\n\u003C\u002Fp>\n\n# IRIS\n\n[![License: MIT OR Apache-2.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT)\n\nA self-hosted email platform combining permanent mailboxes and temporary inboxes.\n\n- **Permanent mailboxes** — sign in with your mail-server account; five fixed\n  folders (Inbox, Sent, Drafts, Archive, Trash), server-side search,\n  plain-text compose with autosave drafts, reply\u002Fforward, attachments,\n  undo send (10 second window), raw view, and DMARC report previews.\n  Rich-text compose (bold, italic, lists, links) sends\n  multipart\u002Falternative with a sanitized HTML part, and each mailbox\n  can have its own signature, set on the Organize page. Link extra\n  mail-server accounts to one login and switch between them from the\n  account menu; each keeps its own folders, labels, filters and\n  signature, and compose always sends from the active mailbox. Admins\n  get an audit trail of logins, sends, and admin actions on the Admin\n  page; its rows are kept forever, with no retention prune.\n- **Temporary inboxes** — anonymous, receive-only addresses that live 1 hour,\n  no sign-up. Web UI: `\u002F#\u002Ftemp`.\n- **Transactional email API** — scoped API keys let your own apps send\n  auth emails (verify, password reset, sign-in link) through IRIS\n  (see [`docs\u002FINTEGRATIONS.md`](docs\u002FINTEGRATIONS.md)).\n- **Separate HTML-mail origin** — HTML bodies can render in an isolated\n  origin behind one-time tokens instead of the app origin (see\n  [`docs\u002Fseparate-mail-origin.md`](docs\u002Fseparate-mail-origin.md)).\n- **Content-Security-Policy** — the app shell ships a strict CSP header\n  (no inline script, handler or style; Turnstile and Google Fonts hosts\n  allowlisted) from the fronting server, and the API stamps the same\n  policy on its own responses.\n\n## Documentation\n\n- [PRD](docs\u002F01-PRD.md) — Product Requirements\n- [TRD](docs\u002F02-TRD.md) — Technical Requirements\n- [AFD](docs\u002F03-AFD.md) — Application Flow\n- [DBD](docs\u002F04-DBD.md) — Design Brief\n- [BSD](docs\u002F05-BSD.md) — Backend Schema\n- [IPD](docs\u002F06-IPD.md) — Implementation Plan\n- [Design System](docs\u002Fdesign.md) — UI\u002FUX Design\n- [Production Readiness](docs\u002F07-PRODUCTION-READINESS.md) — launch checklist + DNS status\n- [Integrations](docs\u002FINTEGRATIONS.md): transactional email API: keys, sending, limits, troubleshooting\n- [Roadmap](ROADMAP.md) — what is built and what is planned\n\n## Prerequisites\n\n- Rust stable toolchain (`cargo`)\n- Node.js 22 (`npm`)\n- A mail server with a JMAP API — IRIS is built against\n  [Stalwart](https:\u002F\u002Fstalw.art\u002F) (JMAP on loopback, e.g.\n  `http:\u002F\u002F127.0.0.1:8092`). One account per permanent mailbox, plus one\n  catch-all account receiving `*@TEMP_INBOX_DOMAIN`.\n- A TLS reverse proxy for production (examples in [`deploy\u002F`](deploy\u002F):\n  nginx or Caddy).\n- DNS for your domains: MX, SPF, DKIM, DMARC, PTR — see\n  [`docs\u002F07-PRODUCTION-READINESS.md`](docs\u002F07-PRODUCTION-READINESS.md) §4.\n\n## Install with your AI agent\n\nThe fastest path on a fresh server: paste this into your coding agent\n(Claude Code, Codex, Cursor, or any agent with shell access):\n\n```text\nInstall IRIS on this server. Repo: https:\u002F\u002Fgithub.com\u002FUrdemonlord\u002Firisproject\nRead README.md and docs\u002F07-PRODUCTION-READINESS.md first — do not guess\nsetup steps from memory.\nAsk me for: the public mail domain (e.g. mail.example.com), and whether\na mail server already exists.\nIf there is no mail server yet, install Stalwart from its official image\n(Stalwart is the only mail server IRIS is built against) and create one\npermanent account plus one catch-all account for the temp inbox.\nThen run: git clone \u003Crepo> && .\u002Fscripts\u002Finstall.sh\nFollow README Deployment to wire systemd + nginx\u002FCaddy + DNS (MX, SPF,\nDKIM, DMARC, PTR). Verify with the README checklist and show me the URLs\nplus the health output.\nNever commit .env, never print secrets, never invent a domain or DNS\nvalue — ask when unsure.\n```\n\nWhat the agent will ask you (it cannot invent these): the public mail\ndomain, and whether a mail server already exists.\n\nWhat [`scripts\u002Finstall.sh`](scripts\u002Finstall.sh) does: checks for cargo,\nNode.js 22+, npm, openssl and curl; creates `.env` (mode 600) with a\ngenerated `SESSION_SECRET`; builds the release API binary and the web\nbundle; warns when the mail server is unreachable.\n\nWhat it does NOT do: install a mail server, touch DNS, enable systemd\nunits, issue TLS certificates, or send any mail. Those need your domain\nand are covered in [Deployment](#deployment).\n\n## One-package install (Debian\u002FUbuntu)\n\nPrefer a single install step over the agent flow above? The official\n`.deb` bundles IRIS, Stalwart and Caddy with automatic TLS: see\n[`packaging\u002FREADME.md`](packaging\u002FREADME.md). Its version follows the\nIRIS release, and the `.deb`, tarball and `install.sh` are attached\nto each GitHub release.\n\n## Quick start (local dev)\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FUrdemonlord\u002Firisproject.git\ncd irisproject\ncp .env.example .env   # then edit: SESSION_SECRET, STALWART_API_URL, TEMP_INBOX_* values\ncargo run -p iris-api  # API on http:\u002F\u002F127.0.0.1:8000 (migrations run on start)\nnpm --prefix apps\u002Fweb install\nnpm --prefix apps\u002Fweb run dev   # web on http:\u002F\u002F127.0.0.1:5173, proxies \u002Fapi + \u002Fauth to the API\n```\n\nOpen http:\u002F\u002F127.0.0.1:5173, sign in with a mail-server account, or grab a\ntemporary inbox at `\u002F#\u002Ftemp`. No seed data and no demo accounts: everything\nyou see comes from your own mail server.\n\n## Temporary inbox\n\nAnonymous, receive-only, 1-hour addresses at `TEMP_INBOX_DOMAIN`.\nWeb UI: `\u002F#\u002Ftemp`. The mail server routes `*@TEMP_INBOX_DOMAIN` to one\ncatch-all mailbox (`TEMP_INBOX_MAIL_USER`); each inbox sees only messages\nwhose `To:` is its address and that arrived after creation.\n\n```text\nPOST \u002Fapi\u002Fv1\u002Ftemp-inboxes                          -> 201 {id, address, access_token, expires_at, expires_in_seconds}\nGET  \u002Fapi\u002Fv1\u002Ftemp-inboxes\u002F:id                      -> status + countdown   (Authorization: Bearer \u003Caccess_token>)\nGET  \u002Fapi\u002Fv1\u002Ftemp-inboxes\u002F:id\u002Fmessages             -> message summaries\nGET  \u002Fapi\u002Fv1\u002Ftemp-inboxes\u002F:id\u002Fmessages\u002F:message_id -> message detail\n```\n\nWrong\u002Fmissing token: 404\u002F401. Past `expires_at`: 410 `expired` (row flipped to `expired`).\nLimits: 10 creates\u002Fhour per IP (`X-Real-IP` trusted only from loopback proxy), 3 active per browser (`iris_temp_client` cookie).\nExpired inboxes are purged by the in-process cleanup job (see Deployment). Not yet: extend\u002Fdelete endpoints, Bcc delivery in the UI (To: header only).\n\n## Stars, labels, folders and filters\n\nSigned-in mailboxes can star messages, tag them with labels, keep their\nown folders next to the five standard ones, and run filters on new mail.\nWeb UI: the sidebar (Starred, your folders and labels) and `\u002F#\u002Forganize`.\n\n- **Stars** are the JMAP `$flagged` keyword; **labels** are plain JMAP\n  keywords (`a-z 0-9 _ -`, up to 32 chars). Label names are listed in\n  SQLite (`mailbox_labels`) so an unused label still exists.\n- **Custom folders** are JMAP mailboxes without a role. Only empty folders\n  can be deleted; mail is never deleted with a folder.\n- **Filters** (`mail_filters`) are compiled into one Sieve script,\n  `iris-filters`, installed through JMAP for Sieve (RFC 9661) and made the\n  account's active script, so rules run at delivery even when IRIS is\n  closed. Activating it deactivates any other active Sieve script on that\n  account. Requires a mail server with `urn:ietf:params:jmap:sieve` and the\n  `fileinto`, `mailboxid` and `imap4flags` extensions (Stalwart has them).\n\n```text\nGET    \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Fmessages?view=starred | label=\u003Cname> | folder_id=\u003Cid> | folder=\u003Crole>\nPOST   \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Fmessages\u002F:id\u002Fstar     {starred}\nPOST   \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Fmessages\u002F:id\u002Flabels   {label, on}\nPOST   \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Fmessages\u002F:id\u002Fmove     {folder} | {folder_id}\nGET    \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Flabels                -> {labels: [{name}]}\nPOST   \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Flabels                {name}\nDELETE \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Flabels\u002F:name          (409 if a filter uses it)\nPOST   \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Ffolders               {name}\nPATCH  \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Ffolders\u002F:id           {name}\nDELETE \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Ffolders\u002F:id           (409 folder_not_empty \u002F folder_in_use_by_filter)\nGET    \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Ffilters               -> {filters: [{id, field, value, action, target}]}\nPOST   \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Ffilters               {field: from|to|subject, value, action: move|label|star|read, target}\nDELETE \u002Fapi\u002Fv1\u002Fmailboxes\u002F:mb\u002Ffilters\u002F:id\n```\n\nLimits: 50 labels, 50 custom folders and 50 filters per mailbox.\n\n## Configuration\n\nEvery variable in [`.env.example`](.env.example) is read by the code\n(`crates\u002Fconfig\u002Fsrc\u002Flib.rs`, `apps\u002Fapi\u002Fsrc\u002Fintegration_apps.rs`). Copy it to\n`.env` (git-ignored, mode 600) and edit.\n\n| Variable | Default | Notes |\n|---|---|---|\n| `IRIS_ENV` | `development` | `production` enables Secure cookies and refuses a weak `SESSION_SECRET` |\n| `IRIS_HOST` \u002F `IRIS_PORT` | `127.0.0.1` \u002F `8000` | API listen address (put a proxy in front) |\n| `DATABASE_URL` | `sqlite:iris.db` | SQLite; use an absolute path on a persistent volume in production, e.g. `sqlite:\u002Fvar\u002Flib\u002Firis\u002Firis.db` |\n| `SESSION_SECRET` | `dev-secret-change-in-prod` | `openssl rand -hex 32`. Also the key for sealed mail credentials: rotating it logs everyone out |\n| `TURNSTILE_SECRET_KEY` | (empty) | Cloudflare Turnstile secret key for login verification; empty = logins skip the challenge. The public half is the web build-time variable `VITE_TURNSTILE_SITE_KEY` — see \"Login CAPTCHA\" below |\n| `TURNSTILE_HOSTNAMES` | (empty) | Comma-separated frontend hostnames a Turnstile token must have been minted on (e.g. `mail.example.com`); while the secret is set, an empty list rejects every login. Loopback hostnames (`localhost`, `127.0.0.1`, `::1`) are rejected at startup in production (allowed outside production, for localhost testing) |\n| `STALWART_API_URL` | `http:\u002F\u002Flocalhost:8092` | JMAP API, loopback only |\n| `TEMP_INBOX_DOMAIN` | `inbox.example.com` | Domain for temporary addresses; needs a catch-all mailbox |\n| `TEMP_INBOX_DEFAULT_EXPIRY_HOURS` | `1` | Temp inbox lifetime |\n| `TEMP_INBOX_MAIL_USER`, `TEMP_INBOX_MAIL_PASSWORD` | (empty) | Catch-all mailbox credentials |\n| `SEND_LOCAL_DOMAINS` | `example.com` | Domains IRIS may send to while no outbound relay is configured (comma-separated) |\n| `SEND_EXTERNAL` | `false` | Allow sending to any domain once the mail server has a working outbound relay |\n| `IRIS_INTEGRATION_EMAIL_FROM` | (empty) | Fixed sender for the transactional email API; leave blank to disable |\n| `IRIS_INTEGRATION_EMAIL_ENABLED` | `false` | Explicit opt-in for integration email delivery |\n| `IRIS_INTEGRATION_APPS` | (unset) | JSON registry of apps allowed to send transactional email; when unset, a built-in example registry is used — see `apps\u002Fapi\u002Fsrc\u002Fintegration_apps.rs` |\n| `RESEND_API_KEY` | (empty) | When set, mail to other domains is relayed through Resend (first in the failover chain) |\n| `IRIS_RESEND_API_URL` | (empty) | Local fake relay override; accepted only outside `production` and only on localhost |\n| `BREVO_API_KEY` | (empty) | When set, Brevo is the second provider in the failover chain, tried when Resend answers with an HTTP error |\n| `IRIS_BREVO_API_URL` | (empty) | Local fake relay override; accepted only outside `production` and only on localhost |\n| `IRIS_PASSWORD_RESET_SERVICE_TOKEN`, `IRIS_PASSWORD_RESET_EMAIL_FROM`, `IRIS_PASSWORD_RESET_EMAIL_TO`, `IRIS_PASSWORD_RESET_PUBLIC_ORIGIN` | (empty) | Optional password-reset webhook for a trusted companion app; all must be set (plus a relay key, `RESEND_API_KEY` or `BREVO_API_KEY`) for the endpoint to answer. Deprecated `IRIS_TIMELESS_*` \u002F `TIMELESS_PUBLIC_ORIGIN` names still work as fallback — see \"Password-reset webhook\" below |\n| `MAIL_CONTENT_ORIGIN` | (empty) | Separate origin serving HTML mail bodies (bare `https:\u002F\u002Fhost`, no path); empty = same-origin srcdoc frame |\n| `IRIS_ADMIN_EMAILS` | (empty) | Comma-separated emails allowed to see the read-only admin dashboard (`#\u002Fadmin`); empty = nobody is an admin, every admin request answers 403 |\n\n### Login CAPTCHA (Cloudflare Turnstile)\n\nOptional bot gate on the sign-in form. When `TURNSTILE_SECRET_KEY` is\nset, `POST \u002Fauth\u002Flogin` accepts an optional `turnstile_token` and\nverifies it server-side against Cloudflare's Siteverify API *before*\nthe mail server is contacted. The check requires `success === true`,\nthe `action` `\"login\"`, and a `hostname` inside `TURNSTILE_HOSTNAMES`;\na missing\u002Finvalid token is rejected with `turnstile_failed` (400). A\nSiteverify outage — and a server-side error such as a wrong secret\n(`invalid-input-secret`) — fails closed with `turnstile_unavailable`\n(503). Failed verifications are capped per IP (20 per 15 minutes);\npast the cap logins answer `too_many_attempts` (429) without calling\nSiteverify. While the secret is set but `TURNSTILE_HOSTNAMES` is empty, every\nlogin is rejected — set the allowlist to the same hostnames the\nwidget is registered for. Loopback hostnames (`localhost`,\n`127.0.0.1`, `::1`) are rejected at startup in production (allowed\noutside production, so localhost Turnstile testing works). When the secret is\nunset, the API skips verification and logins are accepted without a\nserver-side Turnstile check (the API logs a startup warning) — but\nthat alone does not remove the challenge: if the web bundle was built\nwith `VITE_TURNSTILE_SITE_KEY`, the login form still renders the\nwidget and blocks submit until a token is minted, so users still see\n(and must pass) the challenge even though the server never verifies\nthe token. To remove the challenge entirely, rebuild the web without\nthe site key.\n\nThe web widget needs the public site key at build time:\n`VITE_TURNSTILE_SITE_KEY` (empty = no widget; see\n`apps\u002Fweb\u002Fvite.config.ts`). Keep the site key in `.env` as\n`TURNSTILE_SITE_KEY` and pass it to the web build as\n`VITE_TURNSTILE_SITE_KEY`. Create both keys in the Cloudflare\ndashboard → Turnstile → Add site (hostname: your mail domain, e.g.\n`mail.example.com`), then set the secret in `.env` and rebuild the web\nwith the site key. Tokens are single-use and expire after 5 minutes;\nthe form mints a fresh one after every login attempt.\n\nIRIS sets no Content-Security-Policy on the app shell, so no CSP\nchange is needed for the Turnstile script\n(`https:\u002F\u002Fchallenges.cloudflare.com\u002Fturnstile\u002Fv0\u002Fapi.js`) and its\nchallenge iframe. The strict CSP in the mail-body renderer is\nuntouched — Turnstile never runs inside untrusted mail HTML.\n\n### Password-reset webhook\n\nAn optional integration for a trusted companion app that needs to email a\npassword-reset link but has no mail-sending capability of its own:\n`POST \u002Finternal\u002Fv1\u002Fpassword-reset-webhook` with\n`Authorization: Bearer \u003CIRIS_PASSWORD_RESET_SERVICE_TOKEN>` and JSON body\n`{\"token\": \"\u003C43-char url-safe token>\"}`. IRIS sends a fixed-template\nmessage from `IRIS_PASSWORD_RESET_EMAIL_FROM` to the fixed recipient\n`IRIS_PASSWORD_RESET_EMAIL_TO` (never taken from the request), containing\na link to `https:\u002F\u002F\u003CIRIS_PASSWORD_RESET_PUBLIC_ORIGIN>\u002Fadmin\u002Freset#token=\u003Ctoken>`.\nThe endpoint answers `202 {\"accepted\": true}`; `401` for a wrong or\nmissing bearer token, `503` while any of the four variables (or a relay\nkey) is unset, `400` for a malformed token, `502` when\ndelivery fails. It is opt-in: with any variable unset the route still\nexists but always answers `503`.\n\nDeprecated names, kept as fallback when the generic name is unset or\nempty: `IRIS_TIMELESS_SERVICE_TOKEN`, `IRIS_TIMELESS_EMAIL_FROM`,\n`IRIS_TIMELESS_EMAIL_TO`, `TIMELESS_PUBLIC_ORIGIN`. The deprecated route\n`POST \u002Finternal\u002Fv1\u002Ftimeless-password-reset` serves the same handler.\n\nThe first companion app (Timeless) still calls the deprecated route, and\nits client allow-lists that exact path — moving it to the generic route\nis a coordinated change on the caller side: accept\n`\u002Finternal\u002Fv1\u002Fpassword-reset-webhook` in its endpoint check (currently\n`web\u002Fsrc\u002Flib\u002Fserver\u002Fpassword-recovery.js`, the `pathname !== ...` guard)\nand point its reset URL at the new path. No IRIS-side change is needed\nfor that switch.\n\nPublic site settings (build-time, all optional — defaults in `apps\u002Fweb\u002Fvite.config.ts`):\n\n| Variable | Default | Used for |\n|---|---|---|\n| `VITE_SITE_URL` | `https:\u002F\u002Fmail.example.com` | canonical URLs, Open Graph image, `robots.txt`, `sitemap.xml` |\n| `VITE_CONTACT_EMAIL` | `admin@example.com` | footer + Privacy\u002FTerms contact |\n| `VITE_CONTACT_ADDRESS` | empty (hidden) | postal address on Privacy\u002FTerms |\n| `VITE_ANALYTICS_SRC` | empty (off) | Umami tracking script |\n| `VITE_ANALYTICS_WEBSITE_ID` | empty (off) | Umami website ID. Analytics loads only when set **and** the visitor allows it in the cookie notice; only route names are sent. |\n| `VITE_MAIL_CONTENT_ORIGIN` | empty (srcdoc) | separate HTML-mail origin for the web build |\n| `VITE_TURNSTILE_SITE_KEY` | empty (no widget) | Cloudflare Turnstile site key for the login widget; must be set at build time whenever `TURNSTILE_SECRET_KEY` is set — otherwise the login form has no widget and every login fails. See \"Login CAPTCHA\" above |\n\nStatic pages: `\u002Fprivacy\u002F`, `\u002Fterms\u002F`, `\u002F404.html`. The build also emits `robots.txt` and `sitemap.xml`.\n\n## Deployment\n\nSingle host: Stalwart (mail) + `iris-api` (Rust, SQLite) + static web build behind a TLS reverse proxy.\n\nOr run the whole stack (API + web + Stalwart) with Docker Compose — the\nfastest way to try IRIS on a server with Docker:\n\n```bash\nSESSION_SECRET=$(openssl rand -hex 32) docker compose -f deploy\u002Fcompose\u002Fdocker-compose.yaml up -d --build\n# open http:\u002F\u002F127.0.0.1:8080\n```\n\nThen create Stalwart accounts (one permanent user per mailbox + the\ncatch-all `TEMP_INBOX_MAIL_USER`) and set a real `TEMP_INBOX_DOMAIN`\nbefore real use. Known limitation: in the Compose stack, per-IP rate\nlimits see the proxy's IP, not the real client IP (the API trusts\n`X-Real-IP` only from a loopback proxy) — the systemd + nginx deployment\nbelow does not have this problem.\n\n### 1. Mail server (Stalwart)\n\n- Accounts: one permanent user per mailbox, plus the catch-all `TEMP_INBOX_MAIL_USER` receiving `*@TEMP_INBOX_DOMAIN`.\n- Set max message size to 25 MiB (`x:MtaStageData` and `x:Email` `maxMessageSize: 26214400`), restart, confirm EHLO shows `SIZE 26214400`.\n- Expose JMAP only on loopback (`STALWART_API_URL=http:\u002F\u002F127.0.0.1:8092`); public ports: 25 (+587\u002F993 if users use IMAP\u002FSMTP clients).\n- DNS: MX, SPF, DKIM, DMARC, PTR. Current status and required changes: `docs\u002F07-PRODUCTION-READINESS.md` §4.\n\n### 2. API\n\n```bash\ncargo build --release -p iris-api\ncp .env.example .env   # then edit\n```\n\nMigrations run automatically on start. Run under systemd (`Restart=always`) as an unprivileged user.\nThe cleanup job runs inside the API every 60 s (log line `cleanup marked=… purged=…`). As a safety net for when the API is down, `iris-api cleanup-once` runs one retention pass and exits; [`deploy\u002Fsystemd\u002Firis-cleanup.timer`](deploy\u002Fsystemd\u002Firis-cleanup.timer) runs it every 15 min. The timer is inert until activated — see [`deploy\u002Fsystemd\u002FREADME.md`](deploy\u002Fsystemd\u002FREADME.md) for the activation steps and rollback; overlapping runs with a live API are safe.\n\nLogin does not keep the user's password: it mints a Stalwart app password per session (expires with the\nsession, destroyed on logout) and stores it ChaCha20-Poly1305-sealed in SQLite.\n\n### 3. Web + reverse proxy\n\nThe web build needs the Turnstile site key whenever the secret is set\n(`TURNSTILE_SECRET_KEY` in `.env`): without it the bundle has no login\nwidget and every login fails. Read it from `.env` the same way below:\n\n```bash\nnpm --prefix apps\u002Fweb ci && VITE_TURNSTILE_SITE_KEY=$(grep '^TURNSTILE_SITE_KEY=' .env | cut -d= -f2- | tr -d ' ') npm --prefix apps\u002Fweb run build   # -> apps\u002Fweb\u002Fdist\n```\n\nServe `apps\u002Fweb\u002Fdist` and proxy `\u002Fapi` and `\u002Fauth` to the API on the same origin (CSRF cookie + `SameSite`\nrely on it). Proxy must set `X-Real-IP` (trusted only from loopback).\n\nWith nginx, use [`deploy\u002Fnginx\u002Fmail.example.com`](deploy\u002Fnginx\u002Fmail.example.com)\nplus the [`iris-headers.conf`](deploy\u002Fnginx\u002Firis-headers.conf) snippet:\n\n```bash\nVITE_SITE_URL=https:\u002F\u002Fmail.example.com VITE_TURNSTILE_SITE_KEY=$(grep '^TURNSTILE_SITE_KEY=' .env | cut -d= -f2- | tr -d ' ') npm --prefix apps\u002Fweb run build\nrsync -a --delete apps\u002Fweb\u002Fdist\u002F \u002Fsrv\u002Firis\u002Fdist\u002F\nsudo cp deploy\u002Fnginx\u002Firis-headers.conf \u002Fetc\u002Fnginx\u002Fsnippets\u002F\nsudo cp deploy\u002Fnginx\u002Fmail.example.com \u002Fetc\u002Fnginx\u002Fsites-available\u002F\nsudo nginx -t && sudo systemctl reload nginx\n```\n\nAlternatively, with Caddy, use [`deploy\u002Fcaddy\u002FCaddyfile`](deploy\u002Fcaddy\u002FCaddyfile) (Caddy ≥ 2.8). It proxies\n`\u002Fapi` + `\u002Fauth`, serves `dist` with long caching for hashed assets, shows `404.html` for unknown pages and sets\nsecurity headers. Install on the server:\n\n```bash\nrsync -a --delete apps\u002Fweb\u002Fdist\u002F \u002Fsrv\u002Firis\u002Fdist\u002F\nsudo cp deploy\u002Fcaddy\u002FCaddyfile \u002Fetc\u002Fcaddy\u002FCaddyfile\nsudo caddy validate --config \u002Fetc\u002Fcaddy\u002FCaddyfile && sudo systemctl reload caddy\n```\n\n### 4. Verify before go-live\n\n```bash\ncargo test --workspace\nnpm --prefix apps\u002Fweb run build\npython3 scripts\u002Flicense_audit.py                       # no GPL\u002FLGPL\u002FAGPL\u002FSSPL deps\nIRIS_URL=https:\u002F\u002Fmail.example.com IRIS_USER=... IRIS_PASS=... \\\n  SMTP_HOST=mx.example.com python3 scripts\u002Fsecurity_smoke.py   # CSRF, rotation, creds, 25 MiB limit\n```\n\nThen work through `docs\u002F07-PRODUCTION-READINESS.md` (TLS, backups, monitoring, policies).\n\n## Contributing\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md). Security issues: see [`SECURITY.md`](SECURITY.md) — do not open a public issue for a vulnerability.\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n\nat your option.\n","IRIS 是一个自托管的 Web 邮件平台，支持永久邮箱、匿名临时收件箱和事务性邮件 API。核心功能包括基于 JMAP 协议的完整邮箱管理（含服务端搜索、多账户切换、撤回发送、DMARC 报告预览）、1 小时自动销毁的临时收件箱（无需注册），以及带作用域限制的事务性邮件发送 API；HTML 邮件在独立源（separate origin）中通过一次性令牌渲染，配合严格 CSP 策略提升安全性。适用于注重隐私与可控性的中小团队、开发者个人服务器、SaaS 产品集成验证邮件场景。","2026-11-24 04:38:00","CREATED_QUERY"]