Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alissonperez/cloudflare-email-routing-tool
The Cloudflare E-mail Routing Tool is a simple utility to manage and route e-mails using Cloudflare E-mail Routing Service. This tool is designed to streamline the process of creating e-mail addresses within your Cloudflare-managed domains.
https://github.com/alissonperez/cloudflare-email-routing-tool
Last synced: 2 days ago
JSON representation
The Cloudflare E-mail Routing Tool is a simple utility to manage and route e-mails using Cloudflare E-mail Routing Service. This tool is designed to streamline the process of creating e-mail addresses within your Cloudflare-managed domains.
- Host: GitHub
- URL: https://github.com/alissonperez/cloudflare-email-routing-tool
- Owner: alissonperez
- Created: 2024-08-06T17:37:54.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-06T23:18:18.000Z (3 months ago)
- Last Synced: 2024-08-07T02:34:37.432Z (3 months ago)
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloudflare E-mail Routing Tool
## Overview
The Cloudflare E-mail Routing Tool is a simple utility to manage and route e-mails using [Cloudflare E-mail Routing Service](https://www.cloudflare.com/pt-br/developer-platform/email-routing/). This tool is designed to streamline the process of creating e-mail addresses within your Cloudflare-managed domains.
## Dependencies
- Python 3.10+
- Poetry
- [Cloudflare account](https://www.cloudflare.com/)## How to Run
1. Ensure you have Python 3.10+ installed.
2. Install Poetry if you haven't already:
```bash
pip install poetry
```
3. Clone the repository and navigate to the project directory.
4. Install the project dependencies using Poetry:
```bash
poetry install
```
5. Run the main script with the desired service:
```bash
poetry run python emailrouting/main.py "Desired service"
```## Configuration
1. Copy the `.env.example` file to create your own `.env` file:
```bash
cp .env.example .env
```2. Open the `.env` file and fill in the required values based on your Cloudflare account and desired configuration. Here is an example:
```env
CLOUDFLARE_API_TOKEN=your_cloudflare_api_token
CLOUDFLARE_ZONE_ID=your_cloudflare_zone_id
```## Output
The script will create an e-mail address and output a confirmation message. For example:
```
E-mail created: [email protected]
```## Shell
Useful shell to add to your bash PATH
```
#!/bin/bash
ARG=$1
CURRENT_DIR=$(pwd)
cd /path/to/cloned/project || exit
poetry run python emailrouting/main.py "$ARG"
cd "$CURRENT_DIR" || exit
```Add it to some place like `/usr/local/bin` with a name like `createemail`. Add execution permission:
```bash
$ sudo chmod +x /usr/local/bin/createemail
```and then just call from anywhere:
```
$ createemail "The strage service asking my email"
```## Linting
This project uses `ruff` for linting. To run the linter, use the following command:
```bash
poetry run ruff .
```