claw-mail for Openclaw

A high-security, multi-account email management system featuring IMAP/SMTP support, reliable outbox delivery, and automated archival.

borgcube
v1.0.0
Feb 27, 2026
0
1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install claw-mail

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install claw-mail using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is claw-mail?

claw-mail is a comprehensive email management skill designed to empower AI agents with professional-grade communication capabilities. It handles complex workflows across multiple IMAP and SMTP accounts, enabling agents to fetch, read, search, and send rich HTML emails. The skill is built with a focus on reliability, utilizing an IMAP Outbox system to ensure messages are staged and delivered even if primary connections encounter transient issues.

As a core component of the Openclaw Skills ecosystem, claw-mail prioritizes security by enforcing TLS 1.2+ with hardened ciphers and supporting modern authentication like OAuth2. It integrates seamlessly with professional credential managers such as 1Password and macOS Keychain, ensuring that sensitive login data is never stored in plain text while providing the agent with the access it needs to manage inboxes effectively.

claw-mail Use Cases

  • Building automated customer support agents that can read, tag, and reply to inquiries.
  • Orchestrating complex mail merge campaigns with personalized HTML templates and CSV data.
  • Implementing real-time inbox monitoring using IMAP IDLE for immediate response triggers.
  • Managing high-volume email archival into dated folders to maintain organized communication histories.
  • Securely handling sensitive communications using S/MIME signing and encryption for enterprise environments.

How claw-mail Works

  1. The agent loads the multi-account configuration which defines IMAP and SMTP endpoints, credentials, and processing rules.
  2. Secure connections are established using a connection pool, enforcing high-standard TLS encryption for all traffic.
  3. Outgoing messages are staged in a temporary IMAP Outbox folder, ensuring a persistent record of the send attempt.
  4. A heartbeat process monitors the Outbox and executes the SMTP delivery, moving messages to the Sent folder upon success or retrying via fallback relays if needed.
  5. Incoming mail is fetched and passed through a rule-based processing pipeline that can trigger webhooks, archive messages, or flag urgent items.

claw-mail Setup

To integrate this skill from the Openclaw Skills collection into your workflow, you need Python 3.11+. Follow these steps:

  1. Install the necessary dependencies:
pip install PyYAML cryptography
  1. Configure your accounts by creating a config.yaml from the provided example template.
  2. Test the connection by fetching recent unread mail:
python3 scripts/fetch_mail.py --unread-only --config config.yaml

claw-mail Data Schema & Taxonomy

The skill manages email data through structured YAML configurations and standardized IMAP folder hierarchies. It adheres to RFC 5322 for message formatting.

Component Organization Method
Accounts Defined in YAML with specific labels, fetch limits, and archival settings.
Outbox A temporary IMAP folder used to stage messages for reliable SMTP delivery.
Rules Logic-based triggers for actions like flagging, tagging, or moving mail based on sender/subject patterns.
Archival Dated folder structures (e.g., Archive-202603) based on daily, weekly, or monthly frequencies.
Credentials Abstracted via URI schemes for 1Password (op://), Keychain (keychain://), or Environment (env://).

claw-mail Advanced Features

  • Real-time IMAP IDLE push monitoring for instant notification of new messages.
  • Advanced multi-account management with automatic SMTP fallback relay support for high availability.
  • Native integration with 1Password CLI and macOS Keychain for secure, decentralized credential management.
  • Built-in mail merge capabilities supporting CSV/JSON data injection into rich HTML templates.
  • S/MIME support for signing and encrypting messages to meet strict security and compliance requirements.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*