Set up a Cloudflare catch-all inbox

Pair the open-source AliasSend Worker and a Cloudflare D1 database with AliasSend. Allow about three minutes once Email Routing is active and the Worker release and Wrangler login are ready. DNS propagation and domain verification can take longer.

Worker Protocol v1. Updated .

1. Deploy the Worker with D1

Open the official Worker release and follow its deployment instructions. Create a D1 database in your Cloudflare account, put its ID in the release’s Wrangler configuration, apply its migrations to the remote database, and set the Worker’s bearer secret via Wrangler or the dashboard. Use a strong random secret. Keep it out of source control and out of screenshots.

The repository link will be posted when the Worker release is available. Cloudflare D1 setup covers database creation, bindings and migrations.

  1. Run npx wrangler d1 create aliassend-inbox. Copy the returned database ID into the release’s D1 binding configuration and keep the binding name that the release expects.
  2. Run npx wrangler d1 migrations apply aliassend-inbox --remote from the release directory, using the migrations provided by the release.
  3. Run npx wrangler deploy, then set the bearer secret with npx wrangler secret put <release-secret-name>. Save the deployed HTTPS URL for pairing.

2. Route inbound mail

In Cloudflare, select your domain and open Email Routing → Routing rules. Enable Catch-all and set its action to Send to a Worker, then select the deployed Worker. Start with one test address if you already have a production catch-all. Keep or reconfigure other routing rules as required. Cloudflare routing rules explains rule behavior.

3. Pair the app and send a test

Paste the Worker’s pairing JSON into AliasSend when connecting a Worker. Use your HTTPS Worker URL with no credentials, query or fragment. Set sendingEnabled to true only when the deployment can send through Cloudflare Email Sending. Otherwise keep it false and use a separate sending provider.

{
  "v": 1,
  "workerUrl": "https://aliassend-mail.example.workers.dev",
  "secret": "<replace with your Worker bearer secret>",
  "domains": ["example.com"],
  "sendingEnabled": false
}

The app checks GET /health. Verify ok: true, version: 1 and d1Ready: true. Send an email to an unused address on the paired domain. Refresh the Worker inbox and open the message.

Worker Protocol v1

The app calls the Worker URL over HTTPS and includes Authorization: Bearer <secret> on these requests.

See Cloudflare Email Sending setup for domain onboarding and the pairing troubleshooting guide for validation errors.