This skill indexes EML email files from a specified directory into an SQLite database and provides a feature-rich web interface for searching and management. It includes automatic deduplication, IP access control, Excel export, and a JSON-formatted scheduled backup and restore system configurable via the web interface.
Efficient Indexing: Uses MD5 fingerprinting for automatic deduplication, ensuring no duplicate emails are imported. Supports processing millions of email records.
Key Information Extraction: Automatically parses and stores email sender, recipient, subject, body content, and sent time.
Web Query Interface: Provides a Flask-based web interface with:
IP Access Control: Configurable whitelist of allowed IP addresses for web access, enhancing security. By default, only localhost and 127.0.0.1 are allowed.
Web-Configurable Scheduled Backup:
eml-indexer_YYYYMMDD.zip, offering excellent cross-platform compatibility.Admin-Exclusive Interface: When accessed from localhost or 127.0.0.1, a "⚙️ System Settings" tab is displayed, providing IP management, backup configuration, and deletion functionalities.
Ensure your Python environment has the following packages installed:
bash
pip install -r requirements.txt
# Or install manually:
pip install Flask tqdm
text
eml_indexer/
├── app.py # Web application (Flask) - includes scheduled backup thread
├── indexer.py # Core EML indexing script
├── requirements.txt # Python dependencies list
├── SKILL.md # Skill documentation (English)
├── config.json # Runtime configuration (allowed IPs, backup frequency, retention)
├── emails.db # SQLite database file (generated after running indexer.py)
├── backups/ # Directory for JSON backups (automatically created)
└── templates/
├── detail.html # Email detail page template
└── index.html # Email search and management main page template
└── references/
└── SKILL-TW.md # Traditional Chinese version of the skill documentation
Run indexer.py to import EML files from a specified directory into the database. It automatically skips already indexed emails on subsequent runs.
bash
python indexer.py <EML_DIRECTORY_PATH> <DATABASE_PATH (default: emails.db)>
Execute app.py to start the Flask web server. The background scheduled backup thread will also start automatically.
bash
python app.py
After starting, visit http://localhost:5000 in your browser.
When accessing the web interface from localhost or 127.0.0.1, click the "⚙️ System Settings" tab. Here you can:
V7.0.1 (2026-03-30):
references/SKILL-TW.md.V6.0.0 (2026-03-29):
eml-indexer_YYYYMMDD.zip.references/SKILL-TW.md.MIT License