home / skills / openclaw / skills / protonmail

This skill lets you access ProtonMail via IMAP to read, search, and scan mail with daily important email digests.

npx playbooks add skill openclaw/skills --skill protonmail

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.2 KB
---
name: protonmail
description: Read, search, and scan ProtonMail via IMAP bridge (Proton Bridge or hydroxide). Includes daily digest for important emails.
metadata: {"clawdbot":{"emoji":"📧","requires":{"bins":["python3"]}}}
---

# ProtonMail Skill

Access ProtonMail via IMAP using either:
- **Proton Bridge** (official, recommended)
- **hydroxide** (third-party, headless)

## Setup

### Option 1: Proton Bridge (Docker)

```bash
# Pull and run
docker run -d --name=protonmail-bridge \
  -v protonmail:/root \
  -p 143:143 -p 1025:25 \
  --restart=unless-stopped \
  shenxn/protonmail-bridge

# Initial login (interactive)
docker run --rm -it -v protonmail:/root shenxn/protonmail-bridge init
# Then: login → enter credentials → info (shows bridge password) → exit
```

### Option 2: hydroxide (Headless)

```bash
# Install
git clone https://github.com/emersion/hydroxide.git
cd hydroxide && go build ./cmd/hydroxide

# Login
./hydroxide auth [email protected]

# Run as service
./hydroxide serve
```

## Configuration

Create config file at `~/.config/protonmail-bridge/config.env`:

```bash
PROTONMAIL_HOST=127.0.0.1
PROTONMAIL_PORT=143
[email protected]
PROTONMAIL_PASS=your-bridge-password
```

Or set environment variables directly.

## Usage

```bash
# List mailboxes
protonmail.py mailboxes

# Show recent inbox
protonmail.py inbox --limit 10

# Show unread emails
protonmail.py unread

# Search emails
protonmail.py search "keyword"

# Read specific email
protonmail.py read 123
```

## Daily Scan

The `daily-scan.py` script identifies important emails based on:
- Important senders (banks, government, schools)
- Urgent keywords (DE/EN/NL)

Configure important patterns in the script or via environment variables.

## Sieve Filters (ProtonMail)

Recommended Sieve filter for auto-sorting:

```sieve
require ["fileinto", "imap4flags"];

# Important emails - flag them
if anyof (
    address :contains "From" ["@bank", "@government"],
    header :contains "Subject" ["Urgent", "Dringend", "Belangrijk"]
) {
    addflag "\\Flagged";
}

# Newsletters - auto-read and move
if anyof (
    address :contains "From" "newsletter@",
    address :contains "From" "noreply@"
) {
    addflag "\\Seen";
    fileinto "Newsletter";
    stop;
}
```

Overview

This skill connects to ProtonMail accounts via an IMAP bridge (Proton Bridge or hydroxide) to read, search, and scan mail. It includes command-line utilities for listing mailboxes, reading messages, searching, and a daily digest that highlights important emails. The skill is designed for privacy-respecting access and automated scanning of urgent or high-priority messages.

How this skill works

The skill connects to a local IMAP endpoint exposed by Proton Bridge or the hydroxide headless bridge. It reads mailbox metadata, fetches message headers and bodies on demand, and runs a daily-scan routine that detects important senders and urgent keywords. Configuration is done via a small environment file or direct environment variables for host, port, username, and bridge password.

When to use it

  • You need programmatic, local IMAP access to ProtonMail without using the web UI.
  • You want automated daily checks for important or time‑sensitive emails.
  • You prefer running a headless bridge (hydroxide) or a containerized Proton Bridge.
  • You need to script mailbox listing, reading, or searching for backups or monitoring.
  • You want to add server-side Sieve rules to auto-sort or flag messages.

Best practices

  • Use Proton Bridge official image when possible for stability and official support.
  • Store bridge credentials securely and do not commit config.env to source control.
  • Limit IMAP exposure to localhost and use firewall rules if binding to a public interface.
  • Tune daily-scan patterns for your language and sources to reduce false positives.
  • Combine Sieve filters with the daily scanner: flag important mail and file newsletters.

Example use cases

  • Run a cron job to execute daily-scan.py and email a digest of flagged messages.
  • Script a backup that lists mailboxes and fetches recent messages for archival.
  • Search for transaction receipts or invoices across ProtonMail using the CLI search.
  • Move newsletters to a separate folder and mark them as read via Sieve rules.
  • Integrate mailbox read/unread tools into a personal dashboard or monitoring bot.

FAQ

Do I need Proton Bridge installed?

Yes: either Proton Bridge (recommended) or hydroxide must run locally to provide IMAP access.

Where do I put credentials?

Place them in ~/.config/protonmail-bridge/config.env or set equivalent environment variables; keep the file private.