How Cloudflare Email Workers handle inbound mail at the edge — parsing, forwarding, storage and filtering — with the classic pitfalls to avoid.
Email Workers are Cloudflare’s answer to handling inbound mail at the edge. Instead of an SMTP server, you write a handler that receives the raw message, decides what to do, and calls message.forward() or message.setReject(). Here is how the pieces fit together.
message.forward()
message.setReject()
email
message.raw
await message.forward(dest)
forward()
Raw Workers are a good foundation, but management needs a panel: editable rules, searchable archives, per-rule stats. InboxFly wraps this exact pipeline (parse → match → filter → forward → store) in a self-hosted panel you deploy to your own account.
What is the message size limit? 25MiB per message, enforced by the platform.
Can I reject mail at SMTP level? Yes — setReject bounces with a custom reason, which Cloudflare’s dashboard rules cannot do.
setReject