- Início
- Plugins
- Ferramentas e funções
- dsh-qqmail
dsh-qqmail
fubai-fenzhi/dsh-qqmail
Manage a QQ mailbox from DSH over IMAP/SMTP: list, read, search, file by rule, mark read, deduplicate, and send, with a dry-run before every bulk action.
Instalar
dsh plugin --profile web add github:fubai-fenzhi/dsh-qqmailREADME
dsh-qqmail
Manage a QQ mailbox (@qq.com) from DeepSeek Harness: list and read mail, search,
file messages by rule, mark read, remove duplicates, and send — all over IMAP and
SMTP with a small client written against node:tls, so the package has no
runtime dependencies.
Install from npm as @fubai-fenzhi/dsh-qqmail, or add the local directory through
Plugins > Add plugin.
What it registers
| Tool | Purpose |
|---|---|
qqmail_check | Prove login; print inbox and per-folder message/unread counts. |
qqmail_list | Newest-first message list for a folder, optional unread-only. |
qqmail_read | One message by UID: headers, attachment names, text body. |
qqmail_search | Substring search over subject/sender/date in the newest N messages. |
qqmail_archive | Move mail by rules (sender/subject substrings). Dry-run by default. |
qqmail_mark_read | Mark unread mail as read by sender. Dry-run by default. |
qqmail_dedupe | Delete duplicate copies (same Message-ID) inside one folder. |
qqmail_send | Compose; preview by default, send only with apply: true. |
qqmail_setup | Store the address and authorization code in a local secret file (mode 600). |
A companion skill (qqmail) carries the workflow and the provider-specific traps.
How it runs
Every mailbox operation runs in a short-lived Node child process (lib/cli.mjs)
instead of the DSH host. Doing the IMAP/SMTP work in-process made long calls
vanish as an empty error with no stack, because the host cancels them; the child
also keeps blocking network I/O off the host event loop. Credentials travel to
the child over stdin, never through argv or the environment, and the child is
spawned with process.execPath plus ELECTRON_RUN_AS_NODE=1 so the same code
works inside DSH Desktop and in plain Node.
After changing plugin source in a linked install, disable and re-enable the row in Plugins (or restart DSH) to load a fresh module generation — editing the files alone does not hot-reload a Host plugin.
Requirements
- QQ Mail → 设置 → 账号 → 开启 IMAP/SMTP 服务. The client password is the 16-character 授权码, not the QQ password.
- Node 18 or newer. No build step, no dependencies.
Configuration
Credentials are resolved in this order:
- Plugin config
emailandauthcode. - Environment
QQMAIL_EMAILandQQMAIL_AUTHCODE. - The secret file
~/.dsh/qqmail.json(override with configsecretFile).
Preferred: keep the profile clean and let qqmail_setup write the secret file.
{ "email": "12345678@qq.com", "authcode": "<16-char authorization code>" }
Optional config keys: imapHost, imapPort, smtpHost, smtpPort, timeoutMs.
Typical session
qqmail_check → login + folder inventory
qqmail_list { folder: "INBOX", unseen: true } → what needs attention
qqmail_archive { rules: [...], apply: false } → preview hit counts per rule
qqmail_archive { rules: [...], apply: true } → actually move
qqmail_dedupe { folder: "其他文件夹/通知-npm", apply: true }
qqmail_send { to: ["a@b.com"], subject: "Hi", body: "...", apply: false }
Limitations
- Folder rules are substring matches on the decoded
FromandSubject; there is no server-side filter management (set those in the QQ Mail web UI). - Attachment extraction: names are listed, contents are not downloaded.
- Deleting real mail is intentionally out of scope; only duplicate removal is implemented. Move mail to a folder and let the user decide.
- The plugin reads at most the newest N messages per folder (default 300–500) to
keep a single tool call fast; pass a larger
scanwhen needed.
License
MIT
Plugins relacionados
archify (deepseek-harness)
tt-a1i/archify
WeKnora (dsh-weknora)
tencent/weknora
next-ai-draw-io (dsh-plugin)
dayuanjiang/next-ai-draw-io
AiToEarn (dsh-plugin-aitoearn)
yikart/aitoearn