Repository navigation
v0.1.0
cmail v0.1.0
The first release of cmail, a Bash CLI for custom-domain email using Cloudflare Email Routing to receive mail in Gmail and guided Gmail “Send mail as” configuration for outbound mail. No additional hosted mailbox subscription is needed; domain registration still costs money.
Included in this release
./cmail setup— guided dependency installation, GoDaddy authentication and domain selection, Cloudflare zone and Email Routing configuration, destination verification, forwarding rules, and manual Gmail send-as instructions../cmail status— report zone, routing, destination verification, and forwarding-rule state../cmail doctor— check dependencies and authentication. It may install missing dependencies; bothstatusanddoctorcan create or secure local configuration.- Safer re-runs and recovery — skip equivalent nameservers, enabled routing, and existing destinations; reject conflicting rules; use correct account-scoped APIs; validate provider responses and configuration; provide step-specific recovery guidance (PR #1, closing issue #2).
- Documentation and tests — token permissions, DNS migration, account selection, recovery guidance, and six offline regression suites with mocked provider calls.
Getting started
Requires Bash on Linux or macOS and GoDaddy, Cloudflare, and Gmail accounts. Setup can install missing dependencies.
git clone --branch v0.1.0 --depth 1 https://github.com/luongnv89/cmail
cd cmail
./cmail setupBefore running setup
- Nameserver replacement can disrupt existing websites and mail. Migrate DNS records first; interrupted setup does not automatically roll back delegation.
DRY_RUN=1previews only the nameserver change, not the entire setup. Other steps may still change local or provider state.- Keep
.env, tokens, PATs, and Gmail App Passwords private. - Cloudflare provides forwarding, not a mailbox. Gmail send-as remains manual; verify inbound and outbound delivery separately. Gmail SMTP does not DKIM-sign outbound mail with your custom domain.
Thanks to @luongnv89 for the initial implementation and fixes.