126 邮箱管理 Skill

v1.0.0

126.com 网易邮箱管理 CLI。支持收取/发送邮件、搜索邮件、邮件管理和邮件统计。 当用户提到邮件、邮箱、email、发邮件、收邮件、查邮件、126邮箱时触发。 支持其它 skill 和定时任务调用,所有命令输出 JSON 格式。

0· 111·0 current·0 all-time
byPhal studio@slamw

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for slamw/mail-126.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "126 邮箱管理 Skill" (slamw/mail-126) from ClawHub.
Skill page: https://clawhub.ai/slamw/mail-126
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install mail-126

ClawHub CLI

Package manager switcher

npx clawhub@latest install mail-126
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk975mph4f6rdesyw6yy1kwezan84nkpg
111downloads
0stars
1versions
Updated 2w ago
v1.0.0
MIT-0

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 或定时任务需要发送/接收邮件
  • 用户需要查看邮件统计信息

邮箱服务器配置

服务地址端口协议
IMAPimap.126.com993SSL
SMTPsmtp.126.com465SSL
POP3pop.126.com995SSL

注意: 使用本工具前,用户需要在网易邮箱设置中开启 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 "user@126.com" --auth-code "XXXXXXXXXX"

# Step 3: 验证连接
python3 SKILL_DIR/scripts/mail_manager.py config verify

如果用户未提供授权码,主动引导

  1. 登录 mail.126.com → 设置 → POP3/SMTP/IMAP → 开启 IMAP/SMTP 服务
  2. 按提示用手机发送短信获取授权码
  3. 将授权码提供给 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 "sender@example.com"

# 搜索邮件 - 按主题和日期
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 "recipient@example.com" \
  --subject "测试邮件" \
  --body "这是一封测试邮件的内容。"

# 发送带抄送的邮件
python3 SKILL_DIR/scripts/mail_manager.py send \
  --to "a@b.com,c@d.com" \
  --cc "e@f.com" \
  --subject "会议通知" \
  --body "明天下午3点开会。"

# 发送带附件的邮件
python3 SKILL_DIR/scripts/mail_manager.py send \
  --to "a@b.com" \
  --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 "forward@target.com" --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_htmlHTML正文(如有)
attachments附件列表(名称+大小)

Output Format

所有命令输出 JSON:

// 成功
{
  "status": "success",
  "data": { ... },
  "message": "操作描述"
}

// 失败
{
  "status": "error",
  "data": null,
  "message": "错误描述"
}

交互风格

  • 纯 CLI 调用: 所有操作通过命令行参数完成,无交互式输入
  • JSON 输出: 标准化 JSON 格式,便于其他 skill/定时任务解析
  • 中文友好: 自动处理 GBK/UTF-8 编码
  • 超时控制: 默认 30 秒超时,网络操作最多重试 2 次
  • 安全存储: 授权码使用 Base64 编码存储,日志中不输出敏感信息

Comments

Loading comments...