← Back to Skills Marketplace
soderholmm

OpenClaw Email Manager for Postfic and Dovecot

by soderholmm · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
852
Downloads
0
Stars
13
Active Installs
1
Versions
Install in OpenClaw
/install email-manager
Description
Complete email management for Postfix/Dovecot
README (SKILL.md)

\r \r

Email Manager Skill\r

\r This skill provides complete email management using your Postfix/Dovecot infrastructure.\r \r

📋 Configuration\r

\r Edit config.json in the skill directory:\r \r

{\r
  "email_address": "[email protected]",\r
  "email_password": "your-password",\r
  "imap_server": "mail.yourdomain.com",\r
  "smtp_server": "mail.yourdomain.com"\r
}\r
```\r
\r
## 📨 Available Operations\r
\r
### List folders\r
```bash\r
python3 scripts/imap_utils.py list-folders\r
python3 scripts/imap_utils.py list-folders --output json\r
```\r
\r
**Example output:**\r
```\r
📁 Available folders:\r
  • Drafts 📝 DRAFTS\r
  • Sent 📤 SENT\r
  • Trash 🗑️ TRASH\r
  • Junk 📧 SPAM\r
  • INBOX 📥 INBOX\r
  • Archive\r
  • Projects/ClientA\r
```\r
\r
### List emails\r
```bash\r
python3 scripts/imap_utils.py list --folder INBOX --limit 10\r
python3 scripts/imap_utils.py list --flagged-only --output json\r
```\r
\r
### Read email\r
```bash\r
python3 scripts/imap_utils.py read --message-id 1234\r
python3 scripts/imap_utils.py read --message-id 1234 --output json\r
```\r
\r
### Save draft\r
```bash\r
python3 scripts/imap_utils.py save-draft \\r
  --to "[email protected]" \\r
  --subject "Draft subject" \\r
  --body "Draft content"\r
```\r
\r
### List drafts\r
```bash\r
python3 scripts/imap_utils.py list-drafts\r
python3 scripts/imap_utils.py list-drafts --output json\r
```\r
\r
### Update draft\r
```bash\r
python3 scripts/imap_utils.py update-draft \\r
  --draft-id 1234 \\r
  --subject "Updated subject" \\r
  --body "Updated content"\r
```\r
\r
### Send email\r
```bash\r
python3 scripts/smtp_utils.py send \\r
  --to "[email protected]" \\r
  --subject "Test" \\r
  --body "Hello"\r
```\r
\r
### Send draft\r
```bash\r
python3 scripts/smtp_utils.py send-draft --draft-id 1234\r
```\r
\r
### Flag/star email\r
```bash\r
python3 scripts/imap_utils.py flag --message-id 1234 --add\r
python3 scripts/imap_utils.py flag --message-id 1234 --remove\r
python3 scripts/imap_utils.py list --flagged-only\r
```\r
\r
### Move email\r
```bash\r
python3 scripts/imap_utils.py move \\r
  --message-id 1234 \\r
  --from-folder INBOX \\r
  --to-folder Projects\r
```\r
\r
### Create folder\r
```bash\r
python3 scripts/imap_utils.py create-folder --name "NewFolder"\r
```\r
\r
### Delete email\r
```bash\r
python3 scripts/imap_utils.py delete --message-id 1234\r
```\r
\r
### Empty trash\r
```bash\r
python3 scripts/imap_utils.py empty-trash\r
```\r
\r
### Search emails\r
```bash\r
python3 scripts/imap_utils.py search --query "FROM [email protected]"\r
python3 scripts/imap_utils.py search --query "subject:meeting" --output json\r
```\r
\r
### Spam operations\r
```bash\r
# List spam\r
python3 scripts/imap_utils.py list-spam\r
python3 scripts/imap_utils.py list-spam --output json\r
\r
# Mark as spam\r
python3 scripts/imap_utils.py mark-spam --message-id 1234\r
python3 scripts/imap_utils.py mark-spam --message-id 1234 --from-folder INBOX\r
\r
# Mark as not spam\r
python3 scripts/imap_utils.py mark-ham --message-id 1234\r
python3 scripts/imap_utils.py mark-ham --message-id 1234 --from-folder Junk\r
\r
# Empty spam folder\r
python3 scripts/imap_utils.py empty-spam\r
```\r
\r
## 🔍 Folder Auto-Detection\r
\r
The skill automatically detects folder names for:\r
- **Inbox:** INBOX, Inbox\r
- **Drafts:** Drafts, INBOX.Drafts, Draft\r
- **Sent:** Sent, Sent Messages, INBOX.Sent\r
- **Trash:** Trash, Deleted, INBOX.Trash\r
- **Junk/Spam:** Junk, Spam, INBOX.Junk, INBOX.Spam, Bulk\r
- **Archive:** Archive, Archives, INBOX.Archive\r
\r
## 📁 Folder Name Handling\r
\r
The skill cleans up folder names for display by removing IMAP flags like `\HasNoChildren` and quotes. For raw folder data with flags:\r
\r
```bash\r
python3 scripts/imap_utils.py list-folders --output json\r
```\r
\r
**Example JSON output:**\r
```json\r
[\r
  {\r
    "name": "Drafts",\r
    "delimiter": "/",\r
    "flags": ["\\HasNoChildren", "\\Drafts"]\r
  }\r
]\r
```\r
\r
## 🤖 AI Usage Examples\r
\r
Always use `--output json` when parsing results:\r
\r
```bash\r
# List drafts and find specific one\r
drafts=$(python3 scripts/imap_utils.py list-drafts --output json)\r
# Parse JSON to find draft by subject\r
\r
# Send the draft\r
python3 scripts/smtp_utils.py send-draft --draft-id $ID\r
\r
# Check spam count\r
spam=$(python3 scripts/imap_utils.py list-spam --output json)\r
\r
# Get folder metadata\r
folders=$(python3 scripts/imap_utils.py list-folders --output json)\r
```\r
\r
## ✅ Testing\r
\r
Test your configuration:\r
\r
```bash\r
python3 scripts/imap_utils.py list-folders\r
python3 scripts/imap_utils.py list --limit 5\r
python3 scripts/imap_utils.py list-spam\r
```\r
\r
All operations are non-interactive and suitable for automation.\r
\r
## 🚀 Setup Instructions\r
\r
```bash\r
# 1. Create skill directory\r
mkdir -p ~/OpenClaw-Workspace/skills/email-manager/scripts\r
cd ~/OpenClaw-Workspace/skills/email-manager\r
\r
# 2. Create config.json\r
cat > config.json \x3C\x3C 'EOF'\r
{\r
    "email_address": "[email protected]",\r
    "email_password": "your-password",\r
    "imap_server": "mail.yourdomain.com",\r
    "imap_port": 993,\r
    "smtp_server": "mail.yourdomain.com",\r
    "smtp_port": 465,\r
    "folders": {\r
        "drafts": "Drafts",\r
        "sent": "Sent",\r
        "trash": "Trash",\r
        "junk": "Junk"\r
    }\r
}\r
EOF\r
\r
# 3. Make scripts executable\r
chmod +x scripts/*.py\r
\r
# 4. Test it!\r
python3 scripts/imap_utils.py list-folders\r
```\r
\r
## 📝 Common Spam Folder Names\r
\r
Different Dovecot configurations use different spam folder names:\r
- Junk (most common)\r
- Spam\r
- INBOX.Junk\r
- INBOX.Spam\r
- Bulk\r
- Junk E-mail\r
\r
Set it explicitly in `config.json` if auto-detection doesn't work:\r
\r
```json\r
{\r
    "folders": {\r
        "junk": "INBOX.Junk"\r
    }\r
}\r
```\r
\r
## 🎯 Key Benefits\r
\r
- ✅ Zero dependencies - Uses only Python standard library\r
- ✅ No virtualenv needed - Works with system Python\r
- ✅ JSON config - Easy to edit, no parsing libraries needed\r
- ✅ Non-interactive - Perfect for AI automation\r
- ✅ Full feature set - Drafts, send, folders, flags, move, delete, spam\r
- ✅ Debian/Ubuntu compatible - No "externally-managed-environment" errors\r
Usage Guidance
This skill appears to do what it says: it needs your mailbox credentials (email/password) to log in to IMAP and SMTP. Before installing, consider: (1) store credentials securely (use an app-specific password or account with limited access), (2) place config.json in a secure path with restricted permissions rather than a world-readable location, (3) review the scripts yourself or run them in a test account to confirm behavior, (4) be aware the code will try multiple config locations including /etc/openclaw and ~/.openclaw — ensure those paths are appropriate for your deployment, and (5) confirm the agent environment has network access only to your mail servers. The only minor metadata inconsistency is that the registry lists no required env vars despite the code supporting EMAIL_*/IMAP_/SMTP_ environment variables; that does not change the overall coherence but you should be aware of it.
Capability Analysis
Type: OpenClaw Skill Name: email-manager Version: 1.0.0 The email-manager skill bundle provides standard IMAP and SMTP functionality for managing emails via Postfix and Dovecot. The Python scripts (imap_utils.py and smtp_utils.py) use only built-in libraries, contain no obfuscation, and perform actions strictly aligned with the stated purpose. There is no evidence of data exfiltration to unauthorized endpoints, malicious execution, or prompt injection attempts in the documentation.
Capability Assessment
Purpose & Capability
Name/description match the provided code and SKILL.md: the scripts use imaplib/smtplib to list, read, move, mark, draft, and send messages. No unrelated cloud providers, devops systems, or unrelated credentials are requested.
Instruction Scope
SKILL.md instructs creating a config.json and running the provided Python scripts. The scripts operate on IMAP/SMTP servers and only reference expected local config locations (repo config, cwd, ~/.openclaw path, /etc/openclaw). They do not instruct reading arbitrary unrelated system files or exfiltrating data to external endpoints beyond the mail servers.
Install Mechanism
No install spec; this is an instruction-only skill with bundled Python scripts. It requires only python3 and uses the standard library (imaplib/smtplib). No downloads or external packages are pulled in.
Credentials
The skill expects mailbox credentials (email address/password) but the registry metadata lists no required env vars or config paths. The code will read credentials from config.json or the EMAIL_*/IMAP_/SMTP_ environment variables — so although no env vars were declared in metadata, the scripts will accept them. Providing EMAIL_PASSWORD gives complete mailbox access, which is necessary but sensitive; the skill also looks for config.json in system locations (including /etc/openclaw).
Persistence & Privilege
always is false and the skill does not modify other skills or system-wide agent settings. It writes nothing by itself and only reads config.json and environment variables.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install email-manager
  3. After installation, invoke the skill by name or use /email-manager
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of email-manager 1.0.0 — complete email management for Postfix/Dovecot. - Manage emails, drafts, folders, flags, spam, and more using Python3 scripts. - Fully supports listing, reading, composing, flagging, deleting, moving, and searching emails. - Includes robust handling for drafts, spam, and folder auto-detection (Inbox, Sent, Trash, Junk, Archive). - Requires only Python standard library, no external dependencies or virtualenv setup. - All operations are non-interactive — ideal for automation. - Simple JSON-based configuration; supports customization of folder names for various Dovecot setups.
Metadata
Slug email-manager
Version 1.0.0
License MIT-0
All-time Installs 13
Active Installs 13
Total Versions 1
Frequently Asked Questions

What is OpenClaw Email Manager for Postfic and Dovecot?

Complete email management for Postfix/Dovecot. It is an AI Agent Skill for Claude Code / OpenClaw, with 852 downloads so far.

How do I install OpenClaw Email Manager for Postfic and Dovecot?

Run "/install email-manager" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is OpenClaw Email Manager for Postfic and Dovecot free?

Yes, OpenClaw Email Manager for Postfic and Dovecot is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does OpenClaw Email Manager for Postfic and Dovecot support?

OpenClaw Email Manager for Postfic and Dovecot is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created OpenClaw Email Manager for Postfic and Dovecot?

It is built and maintained by soderholmm (@soderholmm); the current version is v1.0.0.

💬 Comments