← 返回 Skills 市场
OpenClaw Email Manager for Postfic and Dovecot
作者
soderholmm
· GitHub ↗
· v1.0.0
· MIT-0
852
总下载
0
收藏
13
当前安装
1
版本数
在 OpenClaw 中安装
/install email-manager
功能描述
Complete email management for Postfix/Dovecot
使用说明 (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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install email-manager - 安装完成后,直接呼叫该 Skill 的名称或使用
/email-manager触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
常见问题
OpenClaw Email Manager for Postfic and Dovecot 是什么?
Complete email management for Postfix/Dovecot. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 852 次。
如何安装 OpenClaw Email Manager for Postfic and Dovecot?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install email-manager」即可一键安装,无需额外配置。
OpenClaw Email Manager for Postfic and Dovecot 是免费的吗?
是的,OpenClaw Email Manager for Postfic and Dovecot 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
OpenClaw Email Manager for Postfic and Dovecot 支持哪些平台?
OpenClaw Email Manager for Postfic and Dovecot 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 OpenClaw Email Manager for Postfic and Dovecot?
由 soderholmm(@soderholmm)开发并维护,当前版本 v1.0.0。
推荐 Skills