126 Mail Cleanup for Openclaw

A specialized tool for managing NetEase 126.com email accounts, offering local backups, bulk cleanup of ads, and storage optimization.

yinghaojia
v1.0.0
Apr 7, 2026
0
697
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install 126mail-cleanup

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install 126mail-cleanup using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is 126 Mail Cleanup?

The 126 Mail Cleanup skill is a developer-focused assistant designed to handle the specific quirks of the NetEase 126.com IMAP implementation. This tool empowers users of Openclaw Skills to take full control of their email data by creating local archives, identifying and removing years of clutter, and stripping massive attachments to stay within free storage limits. It automates the complex handshake requirements, including the mandatory ID command and Chinese folder name encoding, ensuring a seamless management experience.

By leveraging this skill, developers and power users can bypass the limitations of the web interface to perform high-speed indexing, classification, and batch processing. Whether you are migrating data or simply trying to reach Inbox Zero, this utility provides the technical precision needed to manage large-scale email accounts safely.

126 Mail Cleanup Use Cases

  • Reclaiming gigabytes of cloud storage on free 126.com accounts by stripping large attachments.
  • Creating a permanent local backup of entire mailboxes for offline access and data ownership.
  • Bulk-deleting years of subscription emails and advertisements while preserving important personal communications.
  • Auditing email history to identify high-volume senders and platform notifications using metadata indexing.

How 126 Mail Cleanup Works

  1. Establish a secure connection to the 126.com IMAP server using a generated authorization code.
  2. Execute a required ID command to authenticate the client, preventing server rejection.
  3. Perform a comprehensive scan of all folders to index email metadata and determine mailbox health.
  4. Execute a local backup phase to save messages and attachments to your machine with resume support.
  5. Classify emails by sender domain to prepare for bulk cleanup operations based on categories like finance or social.
  6. Interactively move clutter to staging folders before final deletion to ensure data safety.
  7. Replace large attachments on the server with lightweight text stubs after local archiving to reclaim space.

126 Mail Cleanup Setup

Prerequisites

  • Enable IMAP/SMTP Service in your 126.com account settings.
  • Generate an Authorization Code (this is distinct from your login password).

Configuration

Set the following environment variables to allow the Openclaw Skills agent to connect:

export MAIL126_ADDRESS='[email protected]'
export MAIL126_AUTH_CODE='your_auth_code'
export MAIL126_BACKUP_DIR='~/Desktop/126mail'

Verification

Run the setup command to test the IMAP connection and list folder counts:

/126mail setup

126 Mail Cleanup Data Schema & Taxonomy

The skill organizes its local data and metadata using a structured file system to ensure every operation is traceable.

File/Directory Purpose
backup_dir/folder/UID_subject/ Local storage for raw .eml messages and attachments.
_meta.json Metadata sidecar for each email containing subject, date, and sender.
_download_progress.json State tracking for the backup process to enable resuming after interruptions.
email_classification.json A full index of emails grouped by sender domain and predicted category.
_progress.json Tracking file for the attachment stripping and replacement lifecycle.

126 Mail Cleanup Advanced Features

  • Resumable Operations: Every phase tracks progress in persistent JSON files, allowing for interruption and resumption if rate limits are hit.
  • Modified UTF-7 Handling: Automatically encodes and decodes Chinese folder names to ensure compatibility with NetEase's IMAP implementation.
  • Safety-First Deletion Flow: Implements a staging step where target emails are copied to a temporary folder before being purged from the Inbox.
  • Attachment Stubbing: Replaces large server-side files with metadata-rich text stubs, preserving the message context while saving 99% of storage space.
  • Batch Processing: Utilizes UID-based operations and batching logic (500 emails or 4GB) to optimize performance while using Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*