mirror of
https://github.com/Xevion/fastmail-cloudflare.git
synced 2025-12-06 01:14:59 -06:00
Add README, .env.example
This commit is contained in:
2
.env.example
Normal file
2
.env.example
Normal file
@@ -0,0 +1,2 @@
|
||||
CLOUDFLARE_API_TOKEN=
|
||||
TARGET_ZONE_ID=
|
||||
44
README.md
44
README.md
@@ -1,3 +1,47 @@
|
||||
# fastmail-cloudflare
|
||||
|
||||
This is a simple script to update the DNS records of a domain in Cloudflare to point to the Fastmail mail servers.
|
||||
|
||||
> [!WARNING]
|
||||
> This script is not officially supported by Fastmail. Use at your own risk.
|
||||
> Furthermore, it's currently in development and may not work as expected.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node v20+
|
||||
- Newer or older may work, but is untested.
|
||||
- [pnpm][pnpm]
|
||||
- Cloudflare API Token
|
||||
- `DNS Settings:Edit` permission for the zone you want to onboard.
|
||||
- Create one [here][cf-token].
|
||||
- The domain you want to onboard, managed by Cloudflare.
|
||||
|
||||
## Usage
|
||||
|
||||
1. Clone the repository
|
||||
|
||||
```
|
||||
git clone https://github.com/Xevion/fastmail-cloudflare.git`
|
||||
```
|
||||
|
||||
2. Install dependencies
|
||||
|
||||
```
|
||||
cd fastmail-cloudflare && pnpm install
|
||||
```
|
||||
|
||||
3. Configure environment variables
|
||||
|
||||
- Get your Cloudflare API Token.
|
||||
- Copy `.env.example` to `.env` and fill in the values.
|
||||
- `TARGET_ZONE_ID` is the ID of the Zone/Domain you want to onboard.
|
||||
- If you don't know it, run the app without it, and it will list all your zones with their name and ID.
|
||||
|
||||
4. Run the script!
|
||||
|
||||
```
|
||||
pnpm run start
|
||||
```
|
||||
|
||||
[cf-token]: https://dash.cloudflare.com/profile/api-tokens
|
||||
[pnpm]: https://pnpm.io/installation#using-a-standalone-script
|
||||
|
||||
Reference in New Issue
Block a user