Skip to content

RafhaanShah/Cloudflare-Email-RSS

Repository files navigation

Cloudflare-Email-RSS

Create your own RSS (Atom) feeds from emails, processed and hosted by Cloudflare (free plan).

How it works

  1. Emails get sent to your configured address on Cloudflare, e.g. rss@domain.com
  2. The email gets processed by a Cloudflare worker, each sender address gets it's own feed XML file generated, e.g. sender@domain.com -> sender-domain-com.xml
  3. The feed is stored on Cloudflare R2 and is made accessible, e.g. https://domain.com/sender-domain-com.xml
  4. Your RSS Reader is configured to fetch this feed file from Cloudflare R2

Cloudflare Setup

  1. A Cloudflare Account and Domain (needed for email routing)
  2. Create Security Rules to control access to your bucket (e.g. limited to your IP)
  3. Create a R2 Bucket with Public Access
  4. Create a Worker, you can link it to your fork of this repo or clone this repo and deploy it manually
  5. Set values for the required Secrets, see .env.example
  6. Enable Email Routing, and create a new routing address and rule, and link it to the previously created Worker
  7. Use the email address you configured in the Email Routing rule to sign up for newsletters, or forward from your usual email address
  8. Configure Billing Notifications for when you are hitting the limits of the free plan, for R2 and Workers

Development

  • The project uses Cloudflare Wrangler on the CLI
  • Run: npx wrangler dev
  • Test: npx vitest
  • Deploy: npx wrangler deploy
  • Manage Secrets: npx wrangler secret
  • Generate Types: npx wrangler types

License

MIT

About

Cloudflare worker to store incoming email as RSS in R2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors