Stop letting junk mail decide how you spend your attention. Auto Email System reads your inbox first, filters out the noise, summarizes the email worth seeing into Chinese key points, and can notify you on WeChat.
Most inboxes are not hard because of email volume alone. They are hard because school notices, security warnings, bills, receipts, deadlines, and marketing blasts all arrive in the same stream and demand the same attention.
Auto Email System is built to give that attention back to you. It checks unread IMAP/POP3 mail, ignores low-value noise, keeps useful records in a secondary queue, lifts real action items into an important queue, summarizes them in Chinese, and can send the key points to WeChat so you only open the inbox when something is actually worth reading.
The result is a cleaner day: fewer random inbox checks, less time wasted on spam, and a short list of emails that actually need your eyes.
| Inbox pain | What the system does |
|---|---|
| Junk and marketing mail steal your time | Classifies low-value mail as Ignore so it no longer drives your attention |
| Useful records are mixed with urgent work | Separates Important, Secondary, and Ignore queues |
| Long or foreign-language emails slow you down | Generates concise Chinese summaries, reasons, and suggested actions |
| Important details are hidden in files | Uses multimodal analysis for embedded images, image attachments, and PDFs |
| You do not want to keep checking the inbox | Sends selected email summaries to WeChat when they are worth seeing |
Prerequisites:
- Node.js 24.x
- npm
- An IMAP or POP3 mailbox account
- An AI API key compatible with the configured model provider
Run locally:
npm install
npm run build
npm run startOpen:
http://127.0.0.1:8787
Development mode:
npm run devThe web app defaults to http://127.0.0.1:5173; the API defaults to http://127.0.0.1:8787.
The repository publishes a Docker image to GitHub Container Registry:
docker pull ghcr.io/ha22yx/auto-email-system:latest
docker run -d \
--name auto-email-system \
-p 8787:8787 \
-v auto-email-data:/data \
-e DATA_DIR=/data \
ghcr.io/ha22yx/auto-email-system:latestThe image is built by .github/workflows/docker-publish.yml on pushes to main. Do not bake mailbox passwords, AI API keys, WeChat/ClawBot sessions, .env, or data/ into the image. Configure secrets at runtime through the app UI, environment variables, or a mounted /data volume.
- Log in to the admin panel.
- Change the default password. The initial password is
Admin12345; change it before exposing the service. - Fill in your AI API settings.
- Add one or more IMAP / POP3 mailboxes.
- Test each mailbox connection.
- Click "Process now" in the Processing Desk, or enable automatic polling.
Common email ports:
| Protocol | SSL/TLS | Plain |
|---|---|---|
| IMAP | 993 |
143 |
| POP3 | 995 |
110 |
Most providers require enabling IMAP/POP3 in mailbox settings and using an app password or authorization code instead of your normal web-login password.
| Feature | Why it matters |
|---|---|
| Multi-mailbox console | Add IMAP and POP3 accounts, then view each mailbox separately or all mail together. |
| AI triage | Classifies unread mail into Important, Secondary, or Ignore. |
| Chinese summaries | Produces concise Chinese summaries, classification reasons, and suggested actions. |
| Multimodal attachment analysis | GLM-5V-Turbo can inspect embedded images, image attachments, and PDFs. |
| Safe original preview | Email HTML is rendered in a sandboxed iframe with dangerous behavior blocked. |
| Internal read state | Important mail can stay system-unread until you spend time in the detail view. |
| WeChat alerts | Integrated WeClaw / ClawBot bridge can push selected email summaries to WeChat. |
| Self-hosted storage | Runs as a Node app with local JSON storage in data/app.db.json. |
| Queue | What belongs here | Default behavior |
|---|---|---|
| Important | Teachers, school staff, security alerts, payment problems, contracts, deadlines, replies required | Kept unread inside the console, can trigger WeChat notifications |
| Secondary | Payment receipts, order confirmations, billing records, general notices, useful-but-not-urgent information | Marked read when opened, optional notifications |
| Ignore | Promotions, admissions marketing, newsletters, subscriptions, social reminders, low-value notices | Archived as system-read |
flowchart LR
A["IMAP / POP3 mailboxes"] --> B["Fetch unread messages"]
B --> C["Parse text, HTML, attachments, embedded images"]
C --> D["AI + multimodal analysis"]
D --> E{"Priority"}
E -->|Important| F["Important queue"]
E -->|Secondary| G["Secondary queue"]
E -->|Ignore| H["Auto archive"]
F --> I["WeChat notification"]
G --> J["Optional notification"]
F --> K["Persist first, then mark mailbox read"]
G --> K
H --> K
| Layer | Stack |
|---|---|
| Frontend | React 19, Vite, TypeScript, Phosphor Icons |
| Backend | Express 5, TypeScript, tsx |
| imapflow, mailparser, custom POP3 reader | |
| AI | Zhipu GLM Coding Plan / Anthropic-compatible API, GLM-5V-Turbo multimodal |
| Storage | Local JSON database: data/app.db.json |
| Notifications | In-project WeClaw / ClawBot bridge |
The default setup targets Zhipu GLM Coding Plan:
| Field | Default |
|---|---|
| Anthropic-compatible Base URL | https://open.bigmodel.cn/api/anthropic |
| Chat Completions Base URL | https://open.bigmodel.cn/api/coding/paas/v4 |
| Text model | glm-5.2 |
| Multimodal model | glm-5v-turbo |
The classification prompt is intentionally strict:
- Anything you must read, confirm, reply to, save, or act on should become Important or Secondary.
- Promotions, admissions marketing, newsletters, and subscription marketing should become Ignore.
- Payment receipts, charge confirmations, order confirmations, and billing records should become Secondary, not Ignore.
- Teachers, school staff, courses, assignments, deadlines, and account security should become Important.
The admin panel includes ClawBot notification settings. When enabled, the system can push processed important-mail summaries to WeChat.
Highlights:
- The notification bridge can start with the app.
- QR-code binding stores session state and survives restarts.
- Notification categories are configurable: Important, Secondary, Ignore.
- The bridge sends only the email summary produced by this system. It does not forward your WeChat chats to AI.
WeClaw source: https://github.com/fastclaw-ai/weclaw
Related license file: tools/weclaw/LICENSE.
This project handles mailbox authorization codes, AI keys, and raw email content, so security is part of the core design.
| Protection | Details |
|---|---|
| Password login | The admin panel is password protected. Sessions last 7 days by default. |
| Password hashing | Admin password is stored with PBKDF2 + salt. |
| Brute-force protection | Too many failed login attempts temporarily block the source IP. |
| CSRF defense | Mutating requests from untrusted origins are rejected. |
| Security headers | CSP, X-Frame-Options, nosniff, Referrer-Policy, and related headers are enabled. |
| Sandboxed original email | Original HTML is rendered in a sandboxed iframe with scripts, forms, and plugins disabled. |
| Image proxy | Remote images are fetched through a backend proxy that blocks private IPs, credential URLs, unsafe ports, and oversized files. |
| No indexing | robots.txt and X-Robots-Tag are included to discourage search engine indexing. |
Important: data/ stores mailbox authorization codes, AI keys, processed email records, and runtime state. It is excluded by .gitignore. Do not commit data/, .env, server passwords, or BT/Baota API keys.
Recommended deployment targets:
- Local long-running process
- VPS + Node.js
- Baota / BT Panel Node project
- systemd, PM2, or your own Docker packaging
Production suggestions:
- Use HTTPS.
- Change the default login password.
- Harden SSH access on the server.
- Back up
data/app.db.jsonregularly. - Do not expose the app to untrusted shared users.
data/app.db.json Local database for settings, mailboxes, emails, and run history
public/robots.txt Search engine blocking rule
server/src/ Express API, email processing, AI, notifications, security
src/ React admin console
tools/weclaw/ WeClaw / ClawBot runtime files
- You receive too many emails, but only a few actually deserve attention.
- Spam, promotions, newsletters, school notices, bills, receipts, and security alerts are mixed together.
- You want AI to read first, throw away the noise, and surface the mail you should actually see.
- You want Chinese key points and WeChat notifications instead of opening the inbox every time curiosity or anxiety wins.
- You prefer a self-hosted system instead of giving a third-party client long-term mailbox access.
This repository currently does not declare a project-wide open-source license. If you plan to redistribute it publicly, add a project license first and follow the license requirements in tools/weclaw/LICENSE.


