GithubHelp home page GithubHelp logo

intech / mailflare-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from curetix/mailflare-extension

0.0 0.0 0.0 781 KB

Browser extension to use Cloudflare Email Routing as an email alias service like AnonAddy or SimpleLogin

Shell 0.22% TypeScript 98.78% HTML 1.00%

mailflare-extension's Introduction

Cloudflare Email Extension

GitHub package.json version GitHub release (latest by date) GitHub Workflow Status (with branch)

This extension provides an easy way to turn Cloudflare Email Routing into your own private email alias service, similar to AnonAddy, SimpleLogin, and others. No third-party services or tedious configuration of a self-hosted email server needed.

Screenshots

Alias List Create Alias

Features

  • Create / edit / delete aliases, edit / delete aliases in bulk
  • Multiple formats for alias addresses (random characters, random words, custom), optionally prefixed with current website name
  • Search aliases and their descriptions

Potential future features:

  • Create / delete destination addresses
  • One-Click alias generation directly inside email input fields
  • Advanced login options, manually providing account ID and zone IDs to further limit the API token permissions
  • Web version of the extension that can be used on any device, including offline support
  • Email Reply worker (see below)

Installation

  • Download the latest version for your browser from the releases section
  • Firefox
    • When clicking on the file, Firefox will automatically ask if you want to install the extension
    • Alternatively: right-click on the file, Save target as, drag-and-drop the downloaded file into Firefox
  • Chrome and other Chromium browser:
    • Go to the browsers extension page, usually under chrome://extensions
    • Drag-and-drop the downloaded file into the list of extensions

Limitations

See this page:

  • "Email Routing does not forward non-delivery reports to the original sender. This means the sender will not receive a notification indicating that the email did not reach the intended destination."
  • "Email Routing does not support sending or replying from your Cloudflare domain."
  • "Subdomains cannot use Email Routing to forward emails, unless they are part of an Enterprise account."

Additionally, there is a limit of 200 email rules (aliases) and 200 destination addresses per domain.

Create a Cloudflare API token

  1. Create a Cloudflare account, add the domain(s) you want to use and enable Email Routing for the domain(s)
  2. Go to this page
  3. Click "Create Token"
  4. Select "Create Custom Token"
  5. Choose a name, like "Email Extension"
  6. Configure the following permissions (explained in the next section):
    • Account | Email Routing Addresses | Read
    • Zone | Email Routing Rules | Edit
    • Zone | Zone | Read
  7. Set "Account Resources" to your account
  8. Set "Zone Resources" to "All zones" or select the zone you want to use
  9. Configure "Client IP Address Filtering" and "TTL" if you want to
  10. Click "Continue to summary" and then "Create token"
  11. Copy the generated API key

Your API key is stored locally in your browser and is used to directly communicate with the Cloudflare API.

Permissions explained

  • Account | Email Routing Addresses | Read - Listing of destination email addresses
  • Zone | Email Routing Rules | Edit - Listing, creating, editing and deleting of email rules (aliases)
  • Zone | Zone | Read - Listing of all the zones in your Cloudflare account (or the zone you select in the "Zone Resources" section)

Build instructions

  1. Install NodeJS (the automated build workflow uses NodeJS version 18) and yarn (with npm install -g yarn)
  2. Clone the repository: git clone https://github.com/curetix/mailflare-extension
  3. Install the dependencies: yarn install
  4. Run the build command: yarn build (for Chromium / Manifest V3), yarn build:firefox (for Firefox / Manifest V2)
  5. The output will be in the folder build/chrome-mv3-prod or build/firefox-mv2-prod

Loading the extension:

  • Chrome
    1. Go to Settings -> Extensions
    2. Enable the Developer mode toggle (top right)
    3. Click Load unpacked and select the folder of the built extension
  • Firefox
    1. Enter about:debugging into the address bar
    2. Click This Firefox
    3. Click Load Temporary Add-On...
    4. Navigate to the folder of the built extension and select the manifest.json file
    5. (This will have to be repeated every time Firefox launches)

Sending from alias using Email Worker

This is a purely an idea at the moment, it has not been tested!

Email alias services like SimpleLogin and AnonAddy allow their users to reply to emails received from their alias addresses while keeping the users main email private. Here is a nice explanation on how this works.

While this is not possible directly with Cloudflare Email Routing, we can combine a catch-all address, an Email Worker, and an external API service like Mailjet for sending emails to achieve something similar like this.

Let's say you have the alias [email protected] for your private address [email protected]. You receive an email from [email protected] and want to reply using your alias address. Instead of replying directly to [email protected], you would use the address john+alice=[email protected]. Since you do not have a rule matching this configured, it is processed by a catch-all Email Worker. It parses the address into sender and receiver ([email protected] and [email protected]), checks if [email protected] is actually an alias, and forwards the email using an external API like Mailjet (which of course has to be configured for the domain doe.net). Finally, [email protected] will receive a reply to her email from [email protected] instead of your private email address [email protected].

Built with

mailflare-extension's People

Contributors

curetix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.