GoAdmio

zoho

Set up a domain's Zoho Mail DNS records (MX, SPF, DKIM) in Cloudflare

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/zoho prepares a domain's DNS for Zoho Mail, so the domain can send and receive email through Zoho instead of through this server. It adds the DNS records Zoho needs, through the Cloudflare API:

It is a shortcut for the zoho action of cloudflare: it runs /go/cloudflare --domain <domain> --action zoho for you. The records themselves are written by that action, so see cloudflare for the exact record details.

The domain must already be in the Cloudflare account whose ID and API token are saved in GoAdmio (see dns). The command runs sudo internally, so run it as root or as a user with sudo rights.

[!NOTE] Once a domain's MX records point to Zoho, incoming mail goes to Zoho, not to mailboxes on this server. After you run the command, review the domain's MX and SPF records in Cloudflare, especially if the domain also has mailboxes here.


Quick start

# Add the Zoho Mail DNS records for a domain
/go/zoho example.com

Syntax

/go/zoho <domain>

Every run is recorded in /var/log/go/zoho.log, with the time and the arguments you passed.


Options

Argument Required Notes
domain Yes A domain in your Cloudflare account. The value is passed straight to cloudflare --domain, with no checks of its own.

Output

/go/zoho prints nothing itself. You see whatever cloudflare prints for the zoho action, and the command's exit status is the status of that command.

Log

Each run appends one line to /var/log/go/zoho.log:

[Nov 21 12:00:00]# zoho example.com

Examples

# Add the Zoho Mail DNS records for a domain
/go/zoho example.com
# The same thing, written out
/go/cloudflare --domain example.com --action zoho

Troubleshooting

Symptom Likely cause Fix
The records don't appear in Cloudflare The domain isn't in the Cloudflare account, or the saved account ID or API token is missing or wrong. Add the domain with dns and check the Cloudflare settings in GoAdmio.
The command prints an error about the domain No domain was given, or it was misspelled. Run it again with the full domain, for example example.com.
Zoho doesn't see the records yet DNS changes take time to spread. Wait, then check again from Zoho's admin console.
Zoho asks for a verification record Zoho verifies domain ownership separately. Add the record Zoho shows with txt.
Mail still arrives on this server Older MX records are still in place, or DNS hasn't updated. Check the domain's MX records in Cloudflare.

Details

How it works

/go/zoho has no logic of its own. It writes a line to its log and runs cloudflare with the zoho action as the superuser:

Step Action
1 Records the run in /var/log/go/zoho.log.
2 Runs /go/cloudflare --domain <domain> --action zoho.

To add single records yourself, use mx, spf, dkim, dmarc, or txt.


See also

Command Description
cloudflare Configure Cloudflare DNS records, SSL, caching, and security settings for one or all hosted domains through the Cloudflare API
mx Add an MX record to a domain through Cloudflare
spf Add or refresh the SPF TXT record via Cloudflare
dkim Add a DKIM TXT record to a domain's Cloudflare DNS (auto-generated or custom value)
dmarc Add a DMARC TXT record to a domain's Cloudflare DNS (auto-generated or custom value)
txt Add a TXT record to a domain through Cloudflare
google Add Google verification and Google Workspace DNS records to a domain through Cloudflare
dns Add one or all hosted domains to Cloudflare and set up their DNS zone, proxy and cache mode, nameservers, and SSL