← 返回
沟通协作
Key
Mail
Execute email operations with platform-specific optimizations and secure credential handling.
执行邮件操作,采用平台特定优化及安全凭证处理。
ivangdavila
沟通协作
clawhub
v1.2.0 1 版本 99437.6 Key: 需要
#latest
概述
Requirements
Binaries:
himalaya - IMAP/SMTP CLI (brew install himalaya or cargo install himalaya)osascript - macOS only, built-in
Credentials:
- App Password for Gmail (not regular password), stored in macOS Keychain
- Configure in
~/.config/himalaya/config.toml
Data Access
Read-only paths:
~/Library/Mail/V*/MailData/Envelope Index - Apple Mail SQLite database (macOS only)~/Library/Mail/V*/MAILBOX/Messages/ - attachment files (macOS only)
Scope
This skill:
- ✅ Reads email via himalaya CLI or Apple Mail SQLite
- ✅ Sends email via himalaya (draft-review-send workflow)
- ✅ Searches and filters messages
- ❌ NEVER modifies credentials
- ❌ NEVER deletes emails without explicit confirmation
- ❌ NEVER auto-sends without user review
Quick Reference
| Topic | File |
|---|
| ------- | ------ |
| Apple Mail SQLite queries | apple-mail.md |
| himalaya CLI patterns | himalaya.md |
| Send/reply protocol | sending.md |
Core Rules
1. Platform Detection
- macOS with Apple Mail: Use SQLite queries (100x faster than AppleScript)
- Cross-platform: Use himalaya CLI for full IMAP/SMTP
- Never mix approaches in same task - commit to one to avoid state conflicts
2. Apple Mail SQLite
- Query path:
~/Library/Mail/V*/MailData/Envelope\ Index - Force sync first:
osascript -e 'tell app "Mail" to check for new mail' - SQLite reads stale data otherwise - Recent mail filter:
WHERE date_received > strftime('%s','now','-7 days') - Join
messages→addresses on message_id for sender lookup
3. himalaya CLI
- Always use:
--output json flag for programmatic parsing - List emails:
himalaya envelope list -o json (NOT message list) - Folder names are case-sensitive
- Run
himalaya folder list after server-side folder changes
4. Send Protocol
- Draft-review-send workflow: Compose → show user full content → send after explicit OK
- Reply threading: Include
In-Reply-To and References headers or thread breaks - Some SMTP servers reject if From header doesn't match authenticated user
5. Credential Management
- macOS Keychain:
security add-internet-password -s imap.gmail.com -a user@gmail.com -w 'app-password' - Gmail/Google Workspace: Requires App Password with 2FA enabled
- OAuth: himalaya supports XOAUTH2 via token_cmd in config.toml
6. Thread Intelligence
- Thread by
In-Reply-To chain, not subject matching - "Re:" prefix is unreliable
- Polling intervals: 15-30 min max; use
himalaya envelope watch for real-time
版本历史
共 1 个版本
-
v1.2.0
当前
2026-03-28 13:53 安全 安全
安全检测
腾讯云安全 (Sanbu)
安全,无风险
查看报告
🔗 相关推荐
ai-intelligence
ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349
📥 317,679
communication-collaboration
gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 113
📥 52,397
productivity
ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 437
📥 147,151