Yahoo Mail IMAP Export
/install yahoomail-export
Yahoo Mail IMAP Export
⚠️ SAFETY WARNING: This tool moves and deletes emails. Always:
- Test on a small folder first
- Ensure you have backups
- Review the code before running
- Use at your own risk
Overview
Export 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
- Export server: 100,000 visible messages
- Web interface: Shows all messages (uses different API)
The Solution
Move messages in batches to smaller folders, download, clear, repeat:
INBOX (132K) → export1 (8999) → download → clear
→ export2 (8999) → download → clear
→ export3 (8999) → download → clear
→ ... repeat until empty
⚠️ Destructive Operations
This strategy uses IMAP MOVE which:
- Moves emails from INBOX to temporary folders
- Deletes emails from temporary folders after download
Data Loss Risk: If the script fails between MOVE and download, emails may be lost. The script includes safeguards, but bugs or network failures can occur.
Safety Recommendations
- Test first: Run on a small folder (e.g., "Test" with 100 emails)
- Use Yahoo's backup: Export via Yahoo's web interface first as backup
- Monitor closely: Don't leave running unattended initially
- Check counts: Verify message counts match before/after each cycle
- Have backups: Yahoo Mail may have its own backup/restore
Files Included
purge_cycle.py- Main export script (DESTRUCTIVE - moves/deletes emails)move_to_exports.py- Move-only script for testingpre_filter.py- Rule-based email filteringbuild_embeddings.py- Vector embeddings with Ollamatriage_emails.py- LLM-based email triage
Configuration Required
Before running, edit the scripts to set:
- Your Yahoo email address
- Your app password (generate at login.yahoo.com)
- Your base directory path
- VIP senders and search terms (in pre_filter.py)
Manual Usage (Recommended)
Instead of automated cron, run manually first:
python3 purge_cycle.py
Review the output, verify counts, then continue.
Automated Usage (Advanced)
Only after testing manually:
# Run every 15 minutes (adjust as needed)
openclaw cron create \
--name "email-purge-cycle" \
--every 15m \
--message "Run: python3 purge_cycle.py" \
--session isolated
Key Insights
- MOVE command works, COPY+DELETE loses messages
- Always use seq 1:N (sequence numbers shift after MOVE)
- Batch size: 8,999 (Yahoo errors at 10,000)
- Export server FETCH is slow - use regular server for download
Performance
- ~3-4 hours per 8,999 messages
- ~60 hours total for 132K messages
License
MIT-0 - See LICENSE file
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install yahoomail-export - After installation, invoke the skill by name or use
/yahoomail-export - Provide required inputs per the skill's parameter spec and get structured output
What is Yahoo Mail IMAP Export?
Export large Yahoo Mail archives via IMAP using the folder rotation strategy. It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.
How do I install Yahoo Mail IMAP Export?
Run "/install yahoomail-export" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Yahoo Mail IMAP Export free?
Yes, Yahoo Mail IMAP Export is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Yahoo Mail IMAP Export support?
Yahoo Mail IMAP Export is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Yahoo Mail IMAP Export?
It is built and maintained by James Dawdy (@jimdawdy-hub); the current version is v1.0.1.