Real-time email monitoring: IMAP IDLE detects new emails, triggers OpenClaw agent to process and notify the user via their active channel.
The agent MUST explicitly inform the user of all actions below and obtain approval before starting installation. Do not proceed without confirmed user consent.
ActionPath / TargetNotesSystem userimap-watcher (useradd -r)Service runs as this non-root userPython venv/opt/imap-watcher/Isolated env, not system-widepip packageimapclient (inside venv only)Not installed system-wideWatcher script/opt/imap-watcher/imap_watcher.pyCopied from skill directorysystemd unit/etc/systemd/system/imap-watcher.serviceEnabled + started, restarts on bootConfig file/opt/imap-watcher/watcher.confchmod 600, owner imap-watcher onlyLog file/var/log/imap-watcher.logchmod 640, owner imap-watcher
WhatFromConditionhimalaya binarygithub.com/pimalaya/himalaya/releases/latest/Only if not already installedMethodcurl | tar into /usr/local/bin/Writes a system binary
CredentialSourceUsageIMAP email passwordProvided by user at install timeIMAP IDLE connectionTelegram botTokenRead from ~/.openclaw/openclaw.jsonRegisters /beemail* commands via Telegram API ( setMyCommands)
The bot token is never stored by this skill.
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:
ValueBehaviourfalse (default)Agent notifies you via Telegram only. Never replies to senders.askAgent asks you for explicit approval via Telegram before replying.trueAgent 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.
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.
--deps)#bash
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --deps
--test)#bash
echo '{"host":"...","port":993,"ssl":true,"email":"...","password":"..."}' | python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --test
bash
echo '{"host":"...","port":993,"ssl":true,"email":"...","password":"..."}' | python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py
bash
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --register-commands
After running clawhub update bee-push-email, new config fields may be available. Run:
bash
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.
bash
echo '{...}' | python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --force
bash
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --show
bash /root/.openclaw/workspace/skills/bee-push-email/scripts/uninstall.sh --yes
Click to expand command details
/beemail_status#systemctl is-active imap-watcher + systemctl status imap-watcher --no-pager -ljournalctl -u imap-watcher -n 10 --no-pagercat /opt/imap-watcher/last_seen_uids.json/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#setup.py --test/beemail#Quick summary: service active? + last email processed + one-liner health
/beemail_reply#Show current auto-reply mode:
python3 <skill_dir>/scripts/setup.py --reply-status/beemail_reply_off#Disable auto-reply immediately:
python3 <skill_dir>/scripts/setup.py --reply-off/beemail_reply_ask#Set approval-required mode:
python3 <skill_dir>/scripts/setup.py --reply-ask/beemail_reply_on#Enable auto-reply — warn the user first:
python3 <skill_dir>/scripts/setup.py --reply-onIf /beemail* commands don't appear in the Telegram menu after install:
Verify registration: bash
python3 /root/.openclaw/workspace/skills/bee-push-email/scripts/setup.py --register-commands
Manual registration via BotFather:
/setcommandsbeemail — 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 pushIf bot token not found: The setup reads botToken from ~/.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.
journalctl -u imap-watcher -fsystemctl status imap-watchersystemctl restart imap-watcher/opt/imap-watcher/watcher.conf (JSON, chmod 600)/opt/imap-watcher/last_seen_uids.jsonimap_watcher.py maintains persistent IMAP IDLE connectionopenclaw agent --deliver to process and notify userimap-watcher user with auto-reconnect, exponential backoff, and health checks