Files
grok-keygen-new/_temp_email_deploy/README.md
T
chaos 33f966ccea Initial commit: grok-register with private config and auth artifacts.
Include local config, CPA auth files, account dumps, and temp-mail deploy helpers for the private Gitea repo.
2026-07-12 08:10:44 +08:00

1.4 KiB
Raw Blame History

Temp Mail 部署(cloudflare_temp_email)

目标域名默认:zhangyunuo.net

路径 说明
~/projects/cloudflare_temp_email 上游源码
~/projects/temp-email-deploy/deploy.sh 一键部署脚本
~/projects/temp-email-deploy/secrets.env 域名 / Admin 密码 / JWT

一键部署

# 1) 登录 Cloudflare(交互,浏览器授权)
cd ~/projects/cloudflare_temp_email/worker
pnpm exec wrangler login

# 或设置 token:
# export CLOUDFLARE_API_TOKEN=你的token

# 2) 部署
~/projects/temp-email-deploy/deploy.sh

部署后:Email Routing(必做)

Cloudflare 面板 → zhangyunuo.net → Email → Email Routing:

  1. Enable Email Routing(MX 生效)
  2. Catch-all → Send to a Worker → temp-email-zhangyunuo
  3. 会覆盖现有取码 Worker;若要保留取码,改用子域 mail.zhangyunuo.net

自测

source ~/projects/temp-email-deploy/secrets.env
BASE=https://temp-email-zhangyunuo.<subdomain>.workers.dev

curl -sS -X POST "$BASE/admin/new_address" \
  -H "content-type: application/json" \
  -H "x-admin-auth: $ADMIN_PASSWORD" \
  -d '{"name":"test1","domain":"zhangyunuo.net","enablePrefix":true}'

成功返回 address + jwt 后,给该地址发一封测试信,再:

curl -sS "$BASE/api/mails?limit=20&offset=0" \
  -H "Authorization: Bearer <jwt>"