📦 Yahoo Mail IMAP Export — Yahoo MAIl IMAP 导出
v1.0.1导出 large Yahoo MAIl 归档s via IMAP using the folder rotation strategy
运行时依赖
安装命令
点击复制技能文档
Yahoo MAIl IMAP 导出
⚠️ SAFETY 警告: This 工具 moves and 删除s emAIls. Always:
Test on a small folder first Ensure you have 备份s Review the code before 运行ning Use at your own risk Overview
导出 Yahoo MAIl accounts with 100K+ emAIls using the folder rotation strategy to bypass IMAP limitations.
The Problem
Yahoo MAIl's IMAP has hard limits:
Regular server: 10,000 visible messages 导出 server: 100,000 visible messages 网页 interface: Shows all messages (uses different API) The Solution
Move messages in batches to smaller folders, 下载, clear, repeat:
INBOX (132K) → 导出1 (8999) → 下载 → clear → 导出2 (8999) → 下载 → clear → 导出3 (8999) → 下载 → clear → ... repeat until empty
⚠️ Destructive Operations
This strategy uses IMAP MOVE which:
Moves emAIls from INBOX to temporary folders 删除s emAIls from temporary folders after 下载
Data Loss Risk: If the script fAIls between MOVE and 下载, emAIls may be lost. The script includes safe防护s, but bugs or network 失败s can occur.
Safety Recommendations Test first: 运行 on a small folder (e.g., "Test" with 100 emAIls) Use Yahoo's 备份: 导出 via Yahoo's 网页 interface first as 备份 监控 closely: Don't leave 运行ning unattended initially 检查 counts: 验证 message counts match before/after each cycle Have 备份s: Yahoo MAIl may have its own 备份/恢复 Files Included 清理_cycle.py - MAIn 导出 script (DESTRUCTIVE - moves/删除s emAIls) move_to_导出s.py - Move-only script for 测试 pre_过滤器.py - Rule-based emAIl 过滤器ing build_embeddings.py - Vector embeddings with Ollama triage_emAIls.py - LLM-based emAIl triage Configuration Required
Before 运行ning, edit the scripts to 设置:
Your Yahoo emAIl 添加ress Your 应用 password (生成 at 记录in.yahoo.com) Your base directory path VIP 发送ers and 搜索 terms (in pre_过滤器.py) Manual Usage (Recommended)
Instead of automated cron, 运行 manually first:
python3 清理_cycle.py
Review the 输出, 验证 counts, then continue.
Automated Usage (Advanced)
Only after 测试 manually:
# 运行 every 15 minutes (adjust as needed) OpenClaw cron 创建 \ --name "emAIl-清理-cycle" \ --every 15m \ --message "运行: python3 清理_cycle.py" \ --会话 isolated
Key Insights MOVE command works, COPY+删除 loses messages Always use seq 1:N (sequence numbers shift after MOVE) Batch size: 8,999 (Yahoo errors at 10,000) 导出 server FETCH is slow - use regular server for 下载 Performance ~3-4 hours per 8,999 messages ~60 hours total for 132K messages License
MIT-0 - See LICENSE file