PoPosta
Self-hosted · Open source (AGPL-3.0) · Rust

Shared inboxes for small teams, on your own server.

Every mailbox in PoPosta is a group inbox: support@, hello@, billing@. Your team reads, replies and organizes together, sees who is working on what, and hands drafts to each other. Bots and AI assistants can join too, with their own key.

Everything a team inbox needs

One copy of the mail, with each person's own read state, role and history on top. Familiar Gmail habits, plus the things shared mail always lacked.

Group inboxes only

Nobody has a personal mailbox. support@, hello@ and billing@ belong to the team, with aliases and plus addresses that apply labels.

Live presence

See who is viewing, replying or typing in a conversation, and get warned when someone replied a few seconds ago.

Shared drafts

Drafts are visible to the team as a live preview. One editor at a time, with Take over when someone else should finish it.

Gmail habits

Archive, labels, stars, Assigned to me, search operators like from: and is:unread, and a 6-second undo on everything.

Roles per mailbox

Viewer, Drafter, User and Manager. Drafters write replies for others to review and send. One permission check behind every request.

Bots and AI

Give a bot one mailbox, a role and a key. It works through the JSON API or MCP, so Claude or ChatGPT can read mail and draft replies.

Your sign-in

Standard OIDC with any provider: Zitadel, Keycloak, Dex, Authentik… Configured and tested from the admin screen.

Audit log

Every action by a person or a bot is recorded. HTML mail is cleaned and sandboxed, remote images load only when asked.

Roles

Roles are set per mailbox. Someone can be a Manager in support@ and a Viewer in billing@.

RoleCan
ViewerRead and search the mailbox, with their own read/unread state.
DrafterEverything a Viewer can, plus write, edit and discard shared drafts. Can't send: a User reviews and sends.
UserEverything a Drafter can, plus send, label, archive, star, trash, spam and assign.
ManagerEverything a User can, plus manage the mailbox's people, bots and settings.
BotViewer, Drafter or User in exactly one mailbox, through its API key. Never a Manager.
PoPosta adminCreates mailboxes, domains and aliases, manages everyone, sees system settings and the audit log. Reads mail only where they are a member.

Bots, the API and MCP

A bot is a member of one mailbox that signs in with a key instead of a password. It sees and does exactly what its role allows.

  1. On the mailbox's admin page, open Add bot and pick a name, a role and a key expiry.
  2. Copy the key, or the ready-made prompt for ChatGPT or Claude, right away: like any secure API key, it is shown once.
  3. The key and its expiry can't be changed. Generate a new pair on the bot's page whenever you need to; the old key stops at once.
  4. Programs call the JSON API at /api/v1. AI agents connect to /mcp (Streamable HTTP).
claude mcp add --transport http poposta \
  https://mail.example.com/mcp \
  --header "Authorization: Bearer ppb_…"
MCP toolDoes
list_threadsConversations in a folder or label
search_threadsGmail-style search
get_threadMessages as text, plus drafts
create_draftA reply for the team to review
send_draftSend (User role only)
update_threadArchive, label, star, assign…

How it's built

A Rust workspace on top of the Stalwart mail server. Stalwart handles SMTP and storage; PoPosta owns identity, permissions, read state, presence, drafts and sync.

ClientsWeb app (Leptos, SSR + WASM)Programs: JSON APIAI agents: MCP
PoPostaAxum server: /api/v1 · /api/v1/live WebSocket · /mcp · OIDC · sender · reconciler
DataPostgres: users, roles, read state, drafts, auditStalwart 1.2: mail over JMAP

Get started

The dev setup runs entirely in Docker on a Linux box: Postgres, Stalwart, Dex for sign-in and Mailpit as the outside world. Nothing to install on your laptop.

See the README for the dev users, test mail scripts and Stalwart settings.

PoPosta is in active development. It isn't packaged for production yet (no HTTPS setup or release builds), so treat it as a preview.

git clone https://github.com/buzag/poposta
cd poposta/deploy/dev
docker compose up -d                  # postgres, stalwart, dex, mailpit
cp poposta.example.env poposta.env    # fill in the secrets
./run.sh seed                         # sample mailboxes and mail
./run.sh                              # build and serve on :3000