Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器clawhub未标认证来源可访问clear审计提醒

126mail-cleanup126 邮件清理

Agent Skill

126mail-cleanup 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,472

周安装

101

GitHub Stars

公开资料未说明

下载量

792
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:126mail-cleanup(126 邮件清理)
来源仓库:https://github.com/yinghaojia/126mail-cleanup
安装命令:
openclaw skills install 126mail-cleanup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install 126mail-cleanup

简介

清理、备份或优化126.com邮箱账户内容。

  • 支持垃圾邮件删除、订阅管理及本地备份功能。
  • 适用于邮箱空间不足或需定期整理的情况。
  • 安装命令:openclaw skills install 126mail-cleanup。
  • 操作前建议备份重要邮件以防误删。126mail-cleanup 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
126mail-cleanup
description
Use this skill when the user wants to clean up, back up, or optimize their 126.com (NetEase) email account. Covers local backup, spam/subscription bulk deletion, and large attachment stripping. Commands: /126mail backup, classify, cleanup, strip, status.
version
1.0.0
license
MIT
metadata
openclaw
emoji
📧
requires
bins
env
config
description
Your 126.com email address (e.g. user@126.com)
required
true
description
126 IMAP authorization code (NOT your login password — generate at mail.126.com Settings > POP3/SMTP/IMAP > Authorization Code)
required
true
description
Local directory to store email backups
default
~/Desktop/126mail
required
false
description
Threshold in MB for large attachment detection
default
50
required
false
allowed-tools

126 Mail Cleanup

A step-by-step assistant for cleaning up, backing up, and optimizing your NetEase 126.com email account via IMAP. Designed to help reclaim cloud storage, reduce clutter, and create a reliable local archive.

Why Use This Skill

  • Local backup: Download all emails and attachments to your machine — you own your data, not the cloud
  • Cloud storage savings: 126 free accounts have limited space (typically 3-5GB); stripping large attachments can reclaim gigabytes, avoiding the need to pay for premium storage
  • Inbox hygiene: Bulk-delete years of accumulated ads, subscriptions, and platform notifications while preserving important personal emails
  • Safety first: Every destructive operation has a preview, confirmation, and backup step — nothing is permanently deleted without your approval

Commands

CommandDescription
/126mail setupConfigure IMAP credentials and verify connection
/126mail backupDownload emails to local storage (supports resume)
/126mail classifyScan and classify all emails by sender domain
/126mail cleanupInteractively bulk-delete ads/subscriptions
/126mail stripDownload large attachments locally, then replace originals with lightweight stubs on server
/126mail statusShow current mailbox stats and cleanup progress

Setup — Step by Step

Step 1: Enable IMAP Access on 126.com

  1. Log in to https://mail.126.com in a browser
  2. Go to Settings (设置) > POP3/SMTP/IMAP
  3. Enable IMAP/SMTP Service
  4. Generate an Authorization Code (授权码) — this is NOT your login password
  5. Save this code securely

Step 2: Configure the Skill

Provide your credentials when prompted:

MAIL126_ADDRESS=your_email@126.com
MAIL126_AUTH_CODE=your_authorization_code

Step 3: Verify Connection

Run /126mail setup to test the IMAP connection. The skill will:

  • Connect to imap.126.com:993 (SSL)
  • Send the required ID command (126 rejects clients without it)
  • List all folders with email counts and total sizes

IMAP API Reference

126.com IMAP has several quirks. This skill handles them automatically, but here is the reference for transparency:

Connection Requirements

ItemValue
Serverimap.126.com
Port993 (SSL)
AuthLOGIN with authorization code (not password)
ID CommandREQUIRED — must send ID ("name" "IMAPClient" "version" "1.0.0" ...) after login, or server rejects operations

Folder Name Encoding (Modified UTF-7)

Chinese folder names are encoded. Common mappings:

Display NameIMAP Name
已发送 (Sent)&XfJT0ZAB-
草稿箱 (Drafts)&g0l6P3ux-
已删除 (Trash)&XfJSIJZk-
垃圾邮件 (Spam)&V4NXPpCuTvY-

Rate Limits

OperationLimit
FETCH (download)~4GB per session before throttling
SEARCH, SIZE queriesUnlimited
UID SEARCH ALL~3 seconds
UID SEARCH FROM~35 seconds per query
UID COPY~0.25 sec/email, optimal batch = 50

Critical Rule: Always Use UID, Never Sequence Numbers

This is the most important lesson. IMAP sequence numbers shift after any deletion. If you delete email #5, then email #6 becomes #5, #7 becomes #6, etc. Using sequence numbers after deletions WILL operate on wrong emails. Always use UID FETCH, UID STORE, UID COPY, UID SEARCH.

Phase 1: Local Backup (/126mail backup)

What It Does

  • Downloads all emails (including attachments) from all folders
  • Saves each email as message.eml with a _meta.json sidecar
  • Organized as: backup_dir/folder_name/UID_subject/
  • Supports resume on interruption — tracks progress in _download_progress.json

Batch Strategy

  • Downloads in batches of 500 emails or 4GB (whichever comes first)
  • Pauses between batches to avoid hitting 126's rate limit
  • Reconnects every 20 emails to prevent timeout
  • Socket timeout set to 300 seconds for large attachments

Key Decisions for User

DecisionOptionsRecommendation
Which folders to back upAll / INBOX only / CustomStart with INBOX + Sent
Include attachmentsYes / Skip large onesYes (they're your data)
Batch size100-500 emails500 (maximize before rate limit)

Phase 2: Email Classification (/126mail classify)

What It Does

  1. Fetches metadata (subject, from, to, date, size) for ALL emails via IMAP — no content download needed
  2. Groups emails by sender domain
  3. Classifies into categories:

- Platform/Ads: LinkedIn, Amazon, PayPal, JD, Taobao, etc. - Financial Notifications: Banks, brokers, payment services - Services: Cloud, SaaS, travel booking - Personal: Individual senders, known contacts

  1. Outputs all_emails_meta.json (full index) and email_classification.json

Metadata-First Approach

  • SEARCH and ENVELOPE operations are NOT rate-limited on 126
  • Can index 40,000+ emails in minutes
  • UID is tagged on every record for later operations

Key Decisions for User

DecisionOptionsRecommendation
Classification strictnessAggressive / ConservativeConservative — review before delete
Time cutoff for deletionAll time / Before 2025 / CustomBefore current year (keep recent)
Domain whitelistAuto / Manual reviewAlways manually review KEEP list

Phase 3: Bulk Cleanup (/126mail cleanup)

What It Does

  1. Shows classified email counts by category
  2. User reviews and approves DELETE_DOMAINS list and KEEP_DOMAINS list
  3. Safety net: Copies target emails to a staging folder (e.g., "广告邮件") BEFORE deleting from INBOX
  4. Deletes from INBOX via UID STORE +FLAGS \Deleted + EXPUNGE
  5. Random-sample verification (10 emails spot-checked)

The Safe Deletion Flow

INBOX emails  ──UID COPY──>  广告邮件夹 (staging copy)
     │
     └── UID STORE \Deleted + EXPUNGE (remove from INBOX)

User verifies in web client...

广告邮件夹  ──permanent delete──>  Gone (only after user confirms)

Key Decisions for User

DecisionOptionsRecommendation
Deletion scopeBy domain / By category / By dateBy domain — most precise
Staging folderCreate new / Use existingCreate "广告邮件" for review
When to purge stagingImmediately / After 7 days / ManualManual — check in web client first
Verification sample size5 / 10 / 2010 random emails

Common DELETE_DOMAINS Reference

linkedin.com, crunchbase.com, amazon.com, jd.com, 
service.taobao.com, airbnb.com, booking.com, uber.com,
ctrip.com, trip.com, godaddy.com, coursera.org,
service.netease.com, insideapple.apple.com,
accounts.google.com, intl.paypal.com, citibank.com,
mail.meituan.com, sf-express.com, ...

Common KEEP_DOMAINS Reference

svb.com, gusto.com, berkeley.edu, alibaba-inc.com,
live.com, 139.com, pku.edu.cn, ...

Always let the user review and customize these lists based on their own email history.

Phase 4: Large Attachment Stripping (/126mail strip)

What It Does (Two-Phase Safety Process)

Phase A — Download Only (read-only, no server changes)

  1. Search all folders for emails > threshold (default 50MB)
  2. Download each email's attachments to local backup
  3. Save metadata (_meta.json) for each
  4. Track progress in _progress.json
  5. Reconnect every 5 emails to avoid timeout

Phase B — Strip and Replace (destructive, requires explicit confirmation)

  1. For each downloaded email:

- Fetch the full message with FLAGS and INTERNALDATE - Remove attachment parts from the MIME structure - Append a notice: [附件已移除 - 已备份到本地] with file list and original size - Upload the lightweight replacement (preserving original flags and date) - Delete the original heavy email

  1. Track progress — resumable if interrupted

Storage Savings Example

BeforeAfterSaved
70 emails @ 50-200MB each70 emails @ 5-50KB each~3.4GB

Key Decisions for User

DecisionOptionsRecommendation
Size threshold10MB / 20MB / 50MB / 100MB50MB (best ROI)
Which foldersAll / INBOX onlyAll folders
Verify downloads before strippingYes / SkipAlways Yes — Phase B is destructive

Error Handling

ErrorCauseResolution
LOGIN failedWrong auth code or IMAP not enabledRe-generate authorization code at 126 settings
ID command rejectedMissing ID command after loginSkill sends ID automatically — report if this occurs
FETCH timeoutRate limit hit (~4GB)Save progress, wait 1-2 hours, resume
BAD commandFolder name encoding wrongSkill uses correct Modified UTF-7
Sequence number mismatchUsed sequence instead of UIDSkill always uses UID operations

Progress Tracking

All operations save progress to JSON files:

  • _download_progress.json — Full backup progress
  • _progress.json — Large email strip progress
  • cleanup_progress.md — Human-readable summary

This means every operation is resumable. If your connection drops, rate limit hits, or you close your laptop — just run the command again and it picks up where it left off.

Recommended Workflow

  1. /126mail setup — Connect and verify
  2. /126mail status — See current mailbox state
  3. /126mail backup — Full local backup (run multiple times if rate-limited)
  4. /126mail classify — Index and classify all emails
  5. /126mail cleanup — Review and bulk-delete ads/subscriptions
  6. /126mail strip — Reclaim space from large attachments
  7. /126mail status — Verify results

Technical Notes

  • Python 3.6+ with imaplib and email (standard library only, no pip dependencies)
  • All IMAP operations use SSL (port 993)
  • Modified UTF-7 encoding handled automatically for Chinese folder names
  • ID command sent on every connection to satisfy 126's requirement
  • All file names sanitized to remove illegal characters
  • Duplicate attachment filenames handled with suffix numbering

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

91.96%
按下载量换算728

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills