The IMAP watcher collected every unseen message into memory before processing any of them, so a large backlog held every message body at once. Sweeps now fetch and process unseen messages in bounded batches, in UID order, with the existing cursor, retry and sender-gate behavior unchanged. Fixes #160353. Thanks @Ayushdevo for the fix and @addyCooks for the report. Proof: a real ImapFlow TCP connection to an in-process IMAP server holding 2,000 messages, run in a container. - On main, the sweep held all 2,000 bodies at once. With this change it held at most 20, and every message was admitted exactly once in UID order. - A rejection injected at UID 25 resumed from cursor 24. - A sender-gated message (UID 30) was skipped once. - The regression test fails before the fix and passes after, and the watcher suite passes 21/21. Co-authored-by: Ayaan Zaidi <hi@obviy.us> |
||
|---|---|---|
| .. | ||
| assets | ||
| src | ||
| index.ts | ||
| openclaw.plugin.json | ||
| package.json | ||
| README.md | ||
IMAP Email Trigger
Let new email trigger a restricted OpenClaw reader agent. The plugin watches an existing IMAP mailbox, checks allowed senders and sender authentication, and starts an isolated session for each accepted message. It reads incoming mail; it does not send replies or process the mailbox's existing messages on first startup.
Get started
Prepare a restricted reader agent with an authenticated model and working sandbox. Configure the mailbox credentials, sender allowlist, authentication policy, and reader agent under the plugin's account settings, then enable IMAP.
Passwords must resolve to strings. Malformed credentials are rejected; an unresolved secret reference leaves only its account unavailable while other accounts can start.
Follow the IMAP setup guide for the reader configuration, credential storage, and verification steps.