Self-hosted mail hub: all your mailboxes on your own server, ready for AI agents via MCP and REST API
翻译准备中
正在加载完整 README。
查看完整 README ↗All your mailboxes on your own server, ready for AI agents.
DaMail is a self-hosted mail hub. It syncs every mailbox you own into one place and adds AI triage and automation. AI agents get scoped, auditable access to it through MCP and a REST API.
The name sounds like dame (だめ), Japanese for “nope”: no agent sends a single email without your OK.
Website · Documentation · Changelog · 简体中文
| IMAP IDLE push, Microsoft Graph, threading, cross-folder dedup, CJK-friendly search, rich-text compose, signatures, undo send, scheduled send | |
| AI | Mail analysis (category, priority, needs-reply, summary, extracted info), custom labels suggested from your mail, natural-language search, a chat assistant that cites sources, one-click translation, token usage and cost tracking |
| Automation | Inbox rules with AI conditions and dry runs, notifications to Bark, WeCom, DingTalk, Feishu, Telegram or a webhook, daily and weekly reports, mail stats, awaiting-reply tracking, follow-up reminders |
| Subscriptions | Find newsletters you rarely open, sorted by open rate, and unsubscribe in one click (RFC 8058) without visiting the sender's site |
| Open API | MCP server (Streamable HTTP), REST API, scoped API keys, MCP OAuth for ChatGPT and other clients, HMAC-signed webhooks, audit log |
You need a machine with Docker and Docker Compose. Then run:
curl -fsSL https://damail.app/install.sh | sh
The installer asks which language to use (简体中文 or English). It then creates damail/, downloads docker-compose.yml, writes a .env with a random MASTER_KEY and database password, and starts DaMail. Open http://localhost:8787 to create the admin account and add your first mailbox.
If you already have a domain, pass it in:
curl -fsSL https://damail.app/install.sh | DAMAIL_PUBLIC_URL=https://mail.example.com sh
Back up damail/.env. Its MASTER_KEY encrypts your mailbox credentials. To upgrade, run the install command again; your .env is left as is, and database migrations run on startup.
The quick start guide covers installer options, manual setup with Docker Compose, HTTPS and reverse proxies.
read, organize, draft, send, automation) and the mailboxes it can use.Claude Code
claude mcp add --transport http damail https://mail.example.com/mcp \
--header "Authorization: Bearer dm_xxx"
Claude Desktop, Cursor and other MCP clients
{
"mcpServers": {
"damail": {
"type": "http",
"url": "https://mail.example.com/mcp",
"headers": { "Authorization": "Bearer dm_xxx" }
}
}
}
ChatGPT connects through OAuth. Add https://mail.example.com/mcp as a custom connector, sign in to DaMail, and choose permissions and mailboxes on the consent page. Setup details are in ChatGPT and OAuth.
AI assistants. Proactive assistants such as Claude Duet, ChatGPT dots, Grok Bot and Meta Muse connect the same way, through their custom connector settings with OAuth. Once connected they can brief you on new mail, flag what needs a reply and draft answers for your approval. Setup for each assistant is in AI assistants.
An agent never sees tools it isn't allowed to use. Without the send permission, mail it writes goes to Drafts → Awaiting approval.
The full documentation, in English and Chinese, is at damail.app.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗