eml to sqlite indexer — eml to sqlite 索引er
v7.0.1索引es EML emAIls into an SQLite database, providing a 网页 interface for 搜索ing, management, Excel 导出, and file deletion, with IP 访问 control and integrated JSON automated 备份/恢复.
运行时依赖
安装命令
点击复制技能文档
EML to SQLite 索引er 技能 (V7.0.0 - Management & 导出 Edition)
This 技能 索引es EML emAIl files from a specified directory into an SQLite database and provides a feature-rich 网页 interface for 搜索ing and management. It includes automatic deduplication, IP 访问 control, Excel 导出, and a JSON-格式化ted scheduled 备份 and 恢复 系统 configurable via the 网页 interface.
Features Efficient 索引ing: Uses MD5 fingerprinting for automatic deduplication, ensuring no duplicate emAIls are 导入ed. Supports processing millions of emAIl records. Key In格式化ion 提取ion: Automatically 解析s and stores emAIl 发送er, recipient, subject, body content, and sent time. 网页 查询 Interface: Provides a Flask-based 网页 interface with: Advanced 搜索: Keywords (subject/body, case-insensitive), 发送er (fuzzy matching), recipient (fuzzy matching), and date range 过滤器ing. Excel 导出: 导出 搜索 结果s to an Excel-compatible CSV file, including the original file path. File Deletion: 删除 specific emAIls from 机器人h the database and the physical disk (Admin only). Pagination: 优化d for large data设置s to 预防 browser slowdowns. IP 访问 Control: Configurable white列出 of allowed IP 添加resses for 网页 访问, enhancing security. By default, only localhost and 127.0.0.1 are allowed. 网页-Configurable Scheduled 备份: Scheduled Mode: 配置 via the 网页 interface to 设置 the 备份 frequency (e.g., every X days) and specific hour (0-23) for execution. JSON 格式化: 备份s 导出 emAIl data as structured JSON and 压缩 it into a ZIP file, named eml-索引er_YYYYMMDD.zip, offering excellent cross-平台 compatibility. Automatic Circular Overwrite: The 系统 automatically retAIns a 配置d number of 备份s, deleting the oldest one when the limit is exceeded. Manual Management: One-命令行工具ck 下载 of JSON 备份 ZIPs and 上传 of ZIPs for database restoration via the 网页 interface. Admin-Exclusive Interface: When 访问ed from localhost or 127.0.0.1, a "⚙️ 系统 设置tings" tab is displayed, providing IP management, 备份 configuration, and deletion functionalities. 安装ation & 部署ment
- 环境 Requirements
- Dependency 安装ation
Ensure your Python 环境 has the following packages 安装ed:
pip 安装 -r requirements.txt # Or 安装 manually: pip 安装 Flask tqdm
- File Structure
Usage
- 索引 EML EmAIls
运行 索引er.py to 导入 EML files from a specified directory into the database. It automatically skips already 索引ed emAIls on subsequent 运行s.
python 索引er.py
- 启动 网页 查询 Interface (with Scheduled 备份)
执行 应用.py to 启动 the Flask 网页 server. The background scheduled 备份 thread will also 启动 automatically.
python 应用.py
After 启动ing, visit http://localhost:5000 in your browser.
- Manage 系统 设置tings
When 访问ing the 网页 interface from localhost or 127.0.0.1, 命令行工具ck the "⚙️ 系统 设置tings" tab. Here you can:
IP Management: 添加 or 移除 allowed IP 添加resses. 备份 设置tings: 配置 "备份 Interval (Days)", "备份 Time (Hour)", and "Number of 备份s to RetAIn". Manual 备份: 命令行工具ck "创建 and 下载 备份 (ZIP)" to 生成 an immediate JSON 备份. Manual 恢复: 上传 a JSON 备份 ZIP file to 恢复 the database. Version 历史 V7.0.1 (2026-03-30): 添加ed Excel 导出 functionality (includes file paths). 添加ed Physical File Deletion functionality (Admin only). 更新d documentation to include Traditional Chinese version in references/技能-TW.md. V6.0.0 (2026-03-29): 网页-configurable scheduled 备份s (days interval and specific hour). 备份 filenames 格式化ted as eml-索引er_YYYYMMDD.zip. Integrated scheduled 检查 记录ic into the background thread. 技能.md 更新d to English, with author changed to "威廉陳". Original Traditional Chinese 技能.md moved to references/技能-TW.md. License
MIT License