Skip to content

agucova/email-sentinel

Repository files navigation

Email Sentinel System 🛡️

This is a completely unserious prototype implementing this tweet:

Don't ask me why

This repo uses Cloudflare Email Workers to implement a simple greylisting system for your email.

What it does

  1. New person emails you
  2. They get a reply with a simple math question
  3. If they answer correctly:
    • Their email gets delivered
    • They're whitelisted for future emails
  4. If they don't answer or get it wrong, the email stays blocked

How it looks

Is it any good?

No. Please don't use this.

Also it's beyond me why Email Workers doesn't support forwarding emails with an SRS sender.

Setup

  1. Create two KV namespaces in Cloudflare:

    • CHALLENGE_STORE: For pending challenges
    • WHITELIST_STORE: For approved senders
  2. Edit these constants in the code:

const SENTINEL_EMAIL = '[email protected]';
const TARGET_EMAIL = '[email protected]';
const WORKER_ROUTE = 'your-worker.workers.dev';
  1. Deploy to Cloudflare Workers with Email Workers enabled and your KV namespaces bound

That's it! New senders will now need to solve a math problem to reach you.

About

🛡️ A worker that defends your email inbox

Resources

Stars

Watchers

Forks