Read and manage email via IMAP (ProtonMail Bridge, Gmail, etc.). Check for new/unread messages, fetch content, search mailboxes, and mark as read/unread. Works with any IMAP server including ProtonMail Bridge.
Read and manage email via IMAP protocol. Built for ProtonMail Bridge, but works with any IMAP server.
Run the setup helper:
cd skills/imap-email
./setup.sh
Get your Bridge credentials:
1143Enter credentials when prompted
Test the connection:
node scripts/imap.js check
node scripts/imap.js check --limit 10
node scripts/imap.js check --recent 2h # Last 2 hours
node scripts/imap.js check --recent 30m # Last 30 minutes
node scripts/imap.js fetch <uid>
node scripts/imap.js search --unseen
node scripts/imap.js search --from "sender@example.com"
node scripts/imap.js search --subject "important"
node scripts/imap.js search --recent 24h # Last 24 hours
node scripts/imap.js search --recent 7d # Last 7 days
node scripts/imap.js search --since "2026-01-20"
Time format:
30m = last 30 minutes2h = last 2 hours7d = last 7 daysnode scripts/imap.js mark-read <uid>
node scripts/imap.js mark-unread <uid>
node scripts/imap.js list-mailboxes
From any Clawdbot session:
node skills/imap-email/scripts/imap.js check --limit 5
Set up periodic checks:
clawdbot cron add \
--name "email-check-hourly" \
--cron "0 * * * *" \
--session isolated \
--message "Check email inbox and summarize any new emails" \
--deliver \
--channel imessage \
--to "+15551234567"
The agent will automatically use this skill to check email and deliver summaries.
Create a .env file in this folder with your IMAP settings:
# IMAP Email Configuration
# ProtonMail Bridge (example)
IMAP_HOST=127.0.0.1
IMAP_PORT=1143
IMAP_USER=your@protonmail.com
IMAP_PASS=bridge_generated_password
IMAP_TLS=false
IMAP_REJECT_UNAUTHORIZED=false # Set to false for self-signed certs (e.g., ProtonMail Bridge)
IMAP_MAILBOX=INBOX
# Gmail IMAP (example)
# IMAP_HOST=imap.gmail.com
# IMAP_PORT=993
# IMAP_USER=your@gmail.com
# IMAP_PASS=app_specific_password
# IMAP_TLS=true
# IMAP_REJECT_UNAUTHORIZED=true # Default (omit this line for standard IMAP servers)
# IMAP_MAILBOX=INBOX
Configuration options:
IMAP_HOST - Server hostnameIMAP_PORT - Server portIMAP_USER - Your email addressIMAP_PASS - Your password or app-specific passwordIMAP_TLS - Use TLS (false for STARTTLS, true for SSL)IMAP_REJECT_UNAUTHORIZED - Accept self-signed certs (set to false for ProtonMail Bridge)IMAP_MAILBOX - Default mailbox (INBOX)Connection errors:
.envtelnet <host> <port>Authentication failed:
.envTLS/SSL errors:
IMAP_REJECT_UNAUTHORIZED=falseEmpty results:
node scripts/imap.js list-mailboxes to see available foldersSKILL.md - Skill documentation (loaded by Clawdbot)scripts/imap.js - Main IMAP CLI toolpackage.json - Node.js dependencies.env - Your credentials (created by setup.sh or manually)setup.sh - Interactive setup helper.env contains sensitive credentials - keep it private.env to .gitignore if publishing this skill./setup.sh to configure credentialsnode scripts/imap.js checkEdit PDFs with natural-language instructions using the nano-pdf CLI.
Control Sonos speakers (discover/status/play/volume/group).
Terminal Spotify playback/search via spogo (preferred) or spotify_player.
Capture frames or clips from RTSP/ONVIF cameras.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Category:tools