网淘吧来吧,欢迎您!

Apple Mail Search Safe (fruitmail)技能使用说明

2026-03-28 新闻来源:网淘吧 围观:20
电脑广告
手机广告

Fruitmail (快速 & 安全)

基于 SQLite 的 Apple Mail.app 快速搜索,支持全文内容。

安装

npm install -g apple-mail-search-cli

用法

# Complex search
fruitmail search --subject "invoice" --days 30 --unread

# Search by sender
fruitmail sender "@amazon.com"

# List unread emails
fruitmail unread

# Read full email body (supports --json)
fruitmail body 94695

# Open in Mail.app
fruitmail open 94695

# Database stats
fruitmail stats

命令

命令描述
搜索带筛选器的复杂搜索
发件人 <查询>按发件人邮箱搜索
未读列出未读邮件
正文 <id>读取完整邮件正文 (AppleScript)
打开 <id>在 Mail.app 中打开邮件
统计数据库统计信息

搜索选项

--subject <text>   Search subject lines
--days <n>         Last N days
--unread           Only unread emails
--limit <n>        Max results (default: 20)
--json             Output as JSON
--copy             Copy DB before query (safest mode)

示例

# Find bank statements from last month
fruitmail search --subject "statement" --days 30

# Get unread emails as JSON
fruitmail unread --json | jq '.[] | .subject'

# Find emails from Amazon
fruitmail sender "@amazon.com" --limit 50

性能

方法处理 13 万封邮件的耗时
AppleScript(完整迭代)8分钟以上
SQLite(此工具)约50毫秒

技术细节

  • 数据库: ~/Library/Mail/V{9,10,11}/MailData/Envelope Index
  • 查询方法:SQLite(只读) + AppleScript(正文内容)
  • 安全性:只读模式防止修改;提供可选的--copy模式

注意事项

  • 仅限macOS— 查询Apple Mail.app的本地数据库
  • 只读— 可搜索/读取但无法撰写/发送
  • 发送邮件:请使用himalaya技能(IMAP/SMTP)

来源

https://github.com/gumadeiras/fruitmail-cli

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部

相关文章

您是本站第326285名访客 今日有221篇新文章/评论