bee-push-email
by canihojr
Push email notifications via IMAP IDLE + Himalaya + OpenClaw agent. Detects new emails in real-time and triggers the agent to process and notify the user. Use when: setting up email push notifications, configuring IMAP watcher, installing bee-push-email system, testing email connectivity, checking system dependencies, viewing email-push config, troubleshooting IMAP IDLE watcher, or managing the imap-watcher systemd service. Also handles uninstall/cleanup of the bee-push-email system. Trigger on beemail commands: /beemail, /beemail_start, /beemail_stop, /beemail_status, /beemail_test, /beemail_reply, /beemail_reply_off, /beemail_reply_ask, /beemail_reply_on. Also: start watcher, stop watcher, watcher status, email push status, registrar comandos, comandos no aparecen, beemail no funciona en telegram.
安装
claude skill add --url https://github.com/openclaw/skills文档
Email Push — IMAP IDLE → OpenClaw Agent → User Notification
Real-time email monitoring: IMAP IDLE detects new emails, triggers OpenClaw agent to process and notify the user via their active channel.
Security & Permissions
The agent MUST explicitly inform the user of all actions below and obtain approval before starting installation. Do not proceed without confirmed user consent.
What this skill installs (requires root)
| Action | Path / Target | Notes |
|---|---|---|
| System user | imap-watcher (useradd -r) | Service runs as this non-root user |
| Python venv | /opt/imap-watcher/ | Isolated env, not system-wide |
| pip package | imapclient (inside venv only) | Not installed system-wide |
| Watcher script | /opt/imap-watcher/imap_watcher.py | Copied from skill directory |
| systemd unit | /etc/systemd/system/imap-watcher.service | Enabled + started, restarts on boot |
| Config file | /opt/imap-watcher/watcher.conf | chmod 600, owner imap-watcher only |
| Log file | /var/log/imap-watcher.log | chmod 640, owner imap-watcher |
External downloads (requires user awareness)
| What | From | Condition |
|---|---|---|
himalaya binary | github.com/pimalaya/himalaya/releases/latest/ | Only if not already installed |
| Method | curl | tar into /usr/local/bin/ | Writes a system binary |
Credentials accessed
| Credential | Source | Usage |
|---|---|---|
| IMAP email password | Provided by user at install time | IMAP IDLE connection |
Telegram botToken | Read from ~/.openclaw/openclaw.json | Registers /beemail* commands via Telegram API (setMyCommands) |
The bot token is never stored by this skill.
Auto-reply behaviour
By default, the agent is instructed not to reply to email senders. This prevents exposing that the system is active and avoids phishing/spam risks. The allow_auto_reply field in watcher.conf controls this:
| Value | Behaviour |
|---|---|
false (default) | Agent notifies you via Telegram only. Never replies to senders. |
ask | Agent asks you for explicit approval via Telegram before replying. |
true | Agent may reply to senders if it deems appropriate (least safe). |
Configured interactively during install. Change anytime with --reconfigure + systemctl restart imap-watcher.
If auto_reply_mode is missing from an existing install, the watcher logs [SECURITY] WARNING on startup and notifies the agent to alert you. The safe default false is applied until you run --reconfigure. It is read once per operation and used only to call api.telegram.org. The agent must inform the user that their bot token will be used to modify the bot's command menu.
Persistence
This skill installs a persistent background service (Restart=always, starts on boot). It maintains a continuous IMAP connection. The service runs as the dedicated imap-watcher user, not as root.
Uninstall removes everything: service, systemd unit, /opt/imap-watcher/, log file, system user, and Telegram bot commands.
Install Flow (4 stages)
Stage 1: Dependencies (--deps)
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --deps
Stage 2: Test Connection (--test)
echo '{"host":"...","port":993,"ssl":true,"email":"...","password":"..."}' | python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --test
Stage 3: Install (only if Stage 1+2 passed)
echo '{"host":"...","port":993,"ssl":true,"email":"...","password":"..."}' | python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py
Stage 4: Verify (automatic)
Other Modes
Register Bot Commands (after update)
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --register-commands
Reconfigure (after update)
After running clawhub update bee-push-email, new config fields may be available. Run:
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --reconfigure
This detects fields missing from your existing /opt/imap-watcher/watcher.conf and asks about each one interactively — without touching your existing values. Restart the service after: systemctl restart imap-watcher.
Force Reinstall
echo '{...}' | python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --force
Show Config / Uninstall
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --show
bash /root/.openclaw/workspace/skills/bee-push-email/scripts/uninstall.sh --yes
Telegram Bot Commands
<details> <summary>Click to expand command details</summary>/beemail_status
systemctl is-active imap-watcher+systemctl status imap-watcher --no-pager -l- Last 10 log lines:
journalctl -u imap-watcher -n 10 --no-pager - UID state:
cat /opt/imap-watcher/last_seen_uids.json - Report: status, uptime, last email, IMAP state
/beemail_start
systemctl start imap-watcher→ wait 3s → verify active → show last 5 log lines
/beemail_stop
systemctl stop imap-watcher→ verify inactive → report
/beemail_test
- Check service active → read target email from config → tell user to send test email
- Optionally run:
setup.py --test
/beemail
Quick summary: service active? + last email processed + one-liner health
/beemail_reply
Show current auto-reply mode:
- Run
python3 <skill_dir>/scripts/setup.py --reply-status - Report current mode with label: DISABLED / ASK / ENABLED
/beemail_reply_off
Disable auto-reply immediately:
- Run
python3 <skill_dir>/scripts/setup.py --reply-off - Service restarts automatically
- Confirm: "🔒 Auto-reply DISABLED"
/beemail_reply_ask
Set approval-required mode:
- Run
python3 <skill_dir>/scripts/setup.py --reply-ask - Service restarts automatically
- Confirm: "❓ Auto-reply set to ASK"
/beemail_reply_on
Enable auto-reply — warn the user first:
- Inform user: "⚠️ Enabling auto-reply exposes system activity to all senders including spam/phishing. Confirm?"
- Only proceed if user confirms
- Run
python3 <skill_dir>/scripts/setup.py --reply-on - Service restarts automatically
- Confirm: "⚠️ Auto-reply ENABLED"
Telegram Bot Commands Troubleshooting
If /beemail* commands don't appear in the Telegram menu after install:
-
Verify registration:
bashpython3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --register-commands -
Manual registration via BotFather:
- Open @BotFather in Telegram
- Send
/setcommands - Select your bot
- Add each command:
beemail— Email push status & recent emailsbeemail_start— Start IMAP email watcherbeemail_stop— Stop IMAP email watcherbeemail_status— Detailed watcher service statusbeemail_test— Send test email to verify push
-
If bot token not found: The setup reads
botTokenfrom~/.openclaw/openclaw.json. Check that the Telegram channel is configured. -
Commands registered but agent doesn't respond: The agent needs this skill installed to handle the commands. Verify with
clawhub list.
Troubleshooting
- Logs:
journalctl -u imap-watcher -f - Status:
systemctl status imap-watcher - Restart:
systemctl restart imap-watcher - Config:
/opt/imap-watcher/watcher.conf(JSON, chmod 600) - State:
/opt/imap-watcher/last_seen_uids.json
Architecture
imap_watcher.pymaintains persistent IMAP IDLE connection- On new email, resolves active OpenClaw session (with 60s cache)
- Triggers
openclaw agent --deliverto process and notify user - Uses Himalaya for email operations (read, move, reply)
- Runs as systemd service as dedicated
imap-watcheruser with auto-reconnect, exponential backoff, and health checks
相关 Skills
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
MCP服务构建器
by alirezarezvani
从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。
✎ 帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。
相关 MCP 服务
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。