← 返回 Skills 市场
126 邮箱管理 Skill
作者
Phal studio
· GitHub ↗
· v1.0.0
· MIT-0
108
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install mail-126
功能描述
126.com 网易邮箱管理 CLI。支持收取/发送邮件、搜索邮件、邮件管理和邮件统计。 当用户提到邮件、邮箱、email、发邮件、收邮件、查邮件、126邮箱时触发。 支持其它 skill 和定时任务调用,所有命令输出 JSON 格式。
使用说明 (SKILL.md)
Mail-126 — 网易邮箱管理 CLI
概述
| 模块 | 命令 | 功能 |
|---|---|---|
| 初始化 | init |
创建数据目录和默认配置 |
| 配置 | config setup / verify |
配置邮箱账号和授权码、验证连接 |
| 收件箱 | inbox list / read / search |
列出、读取、搜索邮件 |
| 发送 | send / reply / forward |
发送新邮件、回复、转发 |
| 管理 | manage mark / delete / move |
标记已读/未读、删除、移动邮件 |
| 统计 | stats today / range / by-sender / folders |
邮件统计分析 |
When to Run
- 用户提到「邮件」「邮箱」「email」「发邮件」「收邮件」「查邮件」「126邮箱」
- 其他 skill 或定时任务需要发送/接收邮件
- 用户需要查看邮件统计信息
邮箱服务器配置
| 服务 | 地址 | 端口 | 协议 |
|---|---|---|---|
| IMAP | imap.126.com | 993 | SSL |
| SMTP | smtp.126.com | 465 | SSL |
| POP3 | pop.126.com | 995 | SSL |
注意: 使用本工具前,用户需要在网易邮箱设置中开启 IMAP/SMTP 服务并获取「授权码」(非登录密码)。
Workflow
1. 初始化流程
首次使用时:
# Step 1: 初始化数据目录
python3 SKILL_DIR/scripts/mail_manager.py init
# Step 2: 配置邮箱账号(需要用户提供邮箱地址和授权码)
python3 SKILL_DIR/scripts/mail_manager.py config setup --email "[email protected]" --auth-code "XXXXXXXXXX"
# Step 3: 验证连接
python3 SKILL_DIR/scripts/mail_manager.py config verify
如果用户未提供授权码,主动引导:
- 登录 mail.126.com → 设置 → POP3/SMTP/IMAP → 开启 IMAP/SMTP 服务
- 按提示用手机发送短信获取授权码
- 将授权码提供给 CLI 配置
2. 收取邮件
# 列出最近10封邮件
python3 SKILL_DIR/scripts/mail_manager.py inbox list --limit 10
# 列出指定文件夹的邮件(已发送、草稿等)
python3 SKILL_DIR/scripts/mail_manager.py inbox list --folder "Sent Messages" --limit 5
# 读取邮件详情
python3 SKILL_DIR/scripts/mail_manager.py inbox read --uid 12345
# 搜索邮件 - 按发件人
python3 SKILL_DIR/scripts/mail_manager.py inbox search --from "[email protected]"
# 搜索邮件 - 按主题和日期
python3 SKILL_DIR/scripts/mail_manager.py inbox search --subject "会议" --since "2026-04-01"
# 搜索邮件 - 按日期范围
python3 SKILL_DIR/scripts/mail_manager.py inbox search --since "2026-04-01" --until "2026-04-11"
3. 发送邮件
# 发送新邮件
python3 SKILL_DIR/scripts/mail_manager.py send \
--to "[email protected]" \
--subject "测试邮件" \
--body "这是一封测试邮件的内容。"
# 发送带抄送的邮件
python3 SKILL_DIR/scripts/mail_manager.py send \
--to "[email protected],[email protected]" \
--cc "[email protected]" \
--subject "会议通知" \
--body "明天下午3点开会。"
# 发送带附件的邮件
python3 SKILL_DIR/scripts/mail_manager.py send \
--to "[email protected]" \
--subject "文件" \
--body "请查收附件" \
--attachments "/path/to/file1.pdf,/path/to/file2.docx"
# 回复邮件
python3 SKILL_DIR/scripts/mail_manager.py reply --uid 12345 --body "收到,谢谢!"
# 转发邮件
python3 SKILL_DIR/scripts/mail_manager.py forward --uid 12345 --to "[email protected]" --note "请查看此邮件"
4. 邮件管理
# 标记已读
python3 SKILL_DIR/scripts/mail_manager.py manage mark --uid 12345 --flag read
# 标记未读
python3 SKILL_DIR/scripts/mail_manager.py manage mark --uid 12345 --flag unread
# 标记星标
python3 SKILL_DIR/scripts/mail_manager.py manage mark --uid 12345 --flag starred
# 取消星标
python3 SKILL_DIR/scripts/mail_manager.py manage mark --uid 12345 --flag unstarred
# 删除邮件
python3 SKILL_DIR/scripts/mail_manager.py manage delete --uid 12345
# 移动邮件到指定文件夹
python3 SKILL_DIR/scripts/mail_manager.py manage move --uid 12345 --folder "已处理"
5. 邮件统计
# 今日邮件统计
python3 SKILL_DIR/scripts/mail_manager.py stats today
# 指定日期范围统计
python3 SKILL_DIR/scripts/mail_manager.py stats range --since "2026-04-01" --until "2026-04-11"
# 按发件人统计 Top 10
python3 SKILL_DIR/scripts/mail_manager.py stats by-sender --limit 10
# 文件夹概览
python3 SKILL_DIR/scripts/mail_manager.py stats folders
6. 附件下载
# 下载指定邮件的所有附件
python3 SKILL_DIR/scripts/mail_manager.py inbox download --uid 12345 --output-dir "/path/to/save"
# 下载指定邮件的特定附件
python3 SKILL_DIR/scripts/mail_manager.py inbox download --uid 12345 --attachment "report.pdf" --output-dir "/path/to/save"
网易邮箱特殊文件夹映射
| 中文名 | IMAP 文件夹名 |
|---|---|
| 收件箱 | INBOX |
| 已发送 | Sent Messages |
| 草稿 | Drafts |
| 已删除 | Trash |
| 垃圾邮件 | Junk |
| 病毒邮件 | Virus |
数据字段参考
详细字段说明见 references/data-schema.md。
邮件摘要字段 (inbox list)
| 字段 | 说明 |
|---|---|
| uid | 邮件唯一ID |
| from | 发件人 |
| to | 收件人 |
| subject | 主题 |
| date | 日期 |
| flags | 标记(seen/flagged 等) |
| size | 大小(字节) |
邮件详情字段 (inbox read)
| 字段 | 说明 |
|---|---|
| uid | 邮件唯一ID |
| from | 发件人 |
| to | 收件人列表 |
| cc | 抄送列表 |
| subject | 主题 |
| date | 日期 |
| body_text | 纯文本正文 |
| body_html | HTML正文(如有) |
| attachments | 附件列表(名称+大小) |
Output Format
所有命令输出 JSON:
// 成功
{
"status": "success",
"data": { ... },
"message": "操作描述"
}
// 失败
{
"status": "error",
"data": null,
"message": "错误描述"
}
交互风格
- 纯 CLI 调用: 所有操作通过命令行参数完成,无交互式输入
- JSON 输出: 标准化 JSON 格式,便于其他 skill/定时任务解析
- 中文友好: 自动处理 GBK/UTF-8 编码
- 超时控制: 默认 30 秒超时,网络操作最多重试 2 次
- 安全存储: 授权码使用 Base64 编码存储,日志中不输出敏感信息
安全使用建议
This skill appears coherent for managing a 126.com mailbox: it runs a local Python script that connects only to imap.126.com/smtp.126.com and stores config at ~/mail126_data/config.json. Before installing: (1) review the script yourself if possible (it's pure Python standard library); (2) be aware the 'auth_code' is stored Base64-encoded (readable) — use an app-specific authorization code rather than your account password and protect the config file permissions; (3) consider running in a user account or environment where local files are protected; (4) if you allow autonomous agent invocation, remember the agent could send/receive mail using the stored auth_code — only enable that if you trust the agent's behavior. If you want stronger protection, modify the script to encrypt the auth_code or rely on a secure secret store instead of plain Base64.
功能分析
Type: OpenClaw Skill
Name: mail-126
Version: 1.0.0
The mail-126 skill is a legitimate CLI tool for managing NetEase 126.com email accounts via IMAP and SMTP. The Python script (mail_manager.py) uses only standard libraries and follows secure practices such as using SSL/TLS for connections and implementing local storage for configurations in the user's home directory (~/mail126_data). No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
The name/description (126.com email management) align with the included script and SKILL.md. The code talks to imap.126.com and smtp.126.com and stores a local config file; there are no unrelated environment variables, binaries, or external services required.
Instruction Scope
SKILL.md instructs the agent to run the provided Python script with explicit commands for init/config/inbox/send/manage/stats/download. The instructions only reference the local config path (~/mail126_data/config.json) and 126 mail servers. They do not ask the agent to read unrelated files, environment variables, or transmit data to unexpected endpoints.
Install Mechanism
There is no install spec and the skill is instruction+script only. No packages or remote downloads are performed; the script uses only Python standard library. Risk from install mechanics is low.
Credentials
The skill does not request external environment credentials but does require the user's 126 'authorization code' (app-specific password) which it saves in ~/mail126_data/config.json. The code stores the auth_code Base64-encoded (not encrypted) — Base64 is reversible, so treat the file as sensitive. No other unrelated secrets are requested.
Persistence & Privilege
always:false (default) and the skill does not modify other skills or system-wide settings. It stores its own config under the user's home directory only. Autonomous invocation is allowed but is the platform default and not itself a red flag here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mail-126 - 安装完成后,直接呼叫该 Skill 的名称或使用
/mail-126触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of mail-126, a CLI tool for managing 126.com (NetEase) email.
- Supports email reception, sending, searching, management, and statistics with all operations via CLI commands and JSON output.
- Triggers on keywords like 邮件/邮箱/email/发邮件/收邮件/查邮件/126邮箱.
- Provides clear workflow instructions for setup, mailbox operations, attachment handling, and mailbox statistics.
- Facilitates integration with other skills and scheduled tasks by consistent JSON-format responses.
元数据
常见问题
126 邮箱管理 Skill 是什么?
126.com 网易邮箱管理 CLI。支持收取/发送邮件、搜索邮件、邮件管理和邮件统计。 当用户提到邮件、邮箱、email、发邮件、收邮件、查邮件、126邮箱时触发。 支持其它 skill 和定时任务调用,所有命令输出 JSON 格式。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。
如何安装 126 邮箱管理 Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mail-126」即可一键安装,无需额外配置。
126 邮箱管理 Skill 是免费的吗?
是的,126 邮箱管理 Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
126 邮箱管理 Skill 支持哪些平台?
126 邮箱管理 Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 126 邮箱管理 Skill?
由 Phal studio(@slamw)开发并维护,当前版本 v1.0.0。
推荐 Skills