apple-mail

Search and extract Apple Mail messages and attachments read-only from local macOS data.

6|1|Updated Nov 23, 2023
One-click install
npx skills add https://github.com/gmcabrita/dotfiles --skill apple-mail-gmcabrita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apple-mail
Source: https://github.com/gmcabrita/dotfiles/tree/main/.agents/skills/apple-mail
Command: npx skills add https://github.com/gmcabrita/dotfiles --skill apple-mail-gmcabrita

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sqlite3.

What problem does it solve?

Apple Mail stores messages and attachments in local data stores that are not easily queried without specialized tooling. This Skill provides a read-only mechanism to search and inspect messages, read raw RFC822 content, and extract attachments for offline analysis or migration.

Core Features & Use Cases

  • Search messages by sender, recipient, subject, body, date, mailbox, and flags using a local Envelope Index.
  • Read full RFC822 messages from .emlx files to inspect headers and body.
  • Extract attachments to a temporary directory for quick review or migration.
  • Retrieve message metadata and mailbox information to support backups, forensics, or data transfer.

Quick Start

Run the tool to search Apple Mail messages (eg, apple-mail.sh search --from "[email protected]"), then inspect or extract attachments with info or attachment commands.

Frequently Asked Questions about apple-mail

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search Apple Mail messages locally on macOS without altering the database?

You can search Apple Mail messages locally by querying the Envelope Index and .emlx files. This Skill operates strictly in read-only mode, allowing you to find messages by sender, subject, body, date, mailbox, and flags without modifying original data.

Can I extract attachments from .emlx files for backup or forensic analysis?

Yes, you can extract attachments from .emlx files into a temporary directory. This Skill preserves the original message data while exporting attachments, supporting offline analysis, data migration, or forensic workflows.

Does this tool require sqlite3 to read the Apple Mail envelope index?

Yes, sqlite3 is a required dependency to query the Apple Mail envelope index. It enables the Skill to retrieve message metadata, mailbox information, and search results from your local macOS mail data store.

How do I inspect raw RFC822 email headers and bodies from Apple Mail?

You can inspect raw RFC822 content by using the read command on local .emlx files. This allows you to view full message headers and bodies directly, which is useful for forensic inspection and detailed email analysis.

What is the best way to migrate Apple Mail data to another format?

To migrate Apple Mail data, use this Skill to search local Envelope Index records and extract raw RFC822 messages with attachments. This read-only approach ensures your original local mail store remains intact while providing data for conversion.

Are there limitations when searching local Apple Mail stores on macOS?

The primary limitation is that this Skill operates exclusively in read-only mode and relies on the latest local Apple Mail envelope index. It cannot modify emails, send messages, or access data not synchronized to your local macOS mail store.