🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

IMAP Email Reader

by @mvarrieur

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.

Versionv1.0.3
Installs26
πŸ’‘ Examples

Check for new emails:

node skills/imap-email/scripts/imap.js check

Fetch specific email:

node skills/imap-email/scripts/imap.js fetch 

Mark as read:

node skills/imap-email/scripts/imap.js mark-read 

Search mailbox:

node skills/imap-email/scripts/imap.js search --from "sender@example.com" --unseen

βš™οΈ Configuration

Quick setup (ProtonMail Bridge):

cd skills/imap-email
./setup.sh
The setup helper will prompt for Bridge credentials and test the connection.

Manual setup: 1. Copy .env.example to .env in the skill folder 2. Fill in your IMAP credentials 3. The .env file is automatically ignored by git

Environment variables:

IMAP_HOST=127.0.0.1          # Server hostname
IMAP_PORT=1143               # Server port
IMAP_USER=your@email.com
IMAP_PASS=your_password
IMAP_TLS=false               # Use TLS/SSL connection
IMAP_REJECT_UNAUTHORIZED=false  # Set to false for self-signed certs (optional)
IMAP_MAILBOX=INBOX           # Default mailbox

⚠️ Security: Never commit your .env file! It's already in .gitignore to prevent accidents.

ProtonMail Bridge setup:

  • Install and run ProtonMail Bridge
  • Use 127.0.0.1:1143 for IMAP
  • Password is generated by Bridge (not your ProtonMail password)
  • TLS: Use false (Bridge uses STARTTLS)
  • REJECT_UNAUTHORIZED: Set to false (Bridge uses self-signed cert)
  • Gmail IMAP setup:

  • Host: imap.gmail.com
  • Port: 993
  • TLS: true
  • Enable "Less secure app access" or use App Password
  • REJECT_UNAUTHORIZED: Omit or set to true (default)
  • πŸ“‹ Tips & Best Practices

    Connection timeout:

  • Verify IMAP server is running and accessible
  • Check host/port configuration
  • Test with: telnet
  • Authentication failed:

  • Verify username (usually full email address)
  • Check password is correct
  • For ProtonMail Bridge: use Bridge-generated password, not account password
  • For Gmail: use App Password if 2FA is enabled
  • TLS/SSL errors:

  • Match IMAP_TLS setting to server requirements (true for SSL, false for STARTTLS)
  • For self-signed certs (e.g., ProtonMail Bridge): set IMAP_REJECT_UNAUTHORIZED=false
  • Check port matches TLS setting (993 for SSL, 143 for STARTTLS)
  • Empty results:

  • Verify mailbox name (case-sensitive)
  • Check search criteria
  • List mailboxes with list-mailboxes
  • View on ClawHub
    TERMINAL
    clawhub install imap-email

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’