More Zoho News

Zoho Mail’s New CLI Makes Admin Work Scriptable and Faster

TL;DR: ZMail CLI lets IT admins manage Zoho Mail accounts, audit logs, and org settings from the terminal.

Zoho Mail Gets a Command Line Interface — and It’s More Useful Than It Sounds

Zoho has released a command line interface for Zoho Mail — the ZMail CLI — giving IT admins and technically inclined users a text-based way to manage mailboxes, organization settings, audit logs, and more without ever opening a browser tab. It runs on Mac, Windows, and Linux, authenticates through OAuth and Zoho OneAuth (no credentials typed into a terminal), and covers both admin-level operations and individual user account management.

Who Actually Benefits from This

The honest answer is: not everyone, and that’s fine. If your team’s IT admin is already living in a terminal for other tasks — server management, scripting, system checks — this fits naturally into that workflow. The real value isn’t that it does things the web client can’t; it’s that it does them faster and in a way that can be chained, scripted, and repeated without manual clicking. Pulling an audit log, checking a domain configuration, or disabling a departed employee’s account during an offboarding process becomes a one-liner instead of a multi-screen exercise.

We’ve seen organizations where offboarding is genuinely painful because it requires an admin to touch five different interfaces in sequence. The CLI doesn’t solve that entirely on its own, but it removes one of the slower steps — and if you’re scripting the process end-to-end, having Zoho Mail accessible from the command line matters. The userManagement disableUser command alone is worth the setup time for any org that handles regular staff turnover.

The Security Approach Is Worth Noting

One thing that stands out here is how Zoho handled authentication. The CLI never asks you to type your Zoho password into a terminal — it opens an OAuth consent URL in your browser, uses Zoho OneAuth to approve access, and stores only an encrypted refresh token locally. That’s the right call. CLI tools that ask for credentials in plaintext are a real risk in shared or logged environments, so building this on the same OAuth stack as the rest of Zoho’s apps was the correct design decision, not just a nice-to-have. Read the full announcement on Zoho’s blog for the complete setup walkthrough, including Java version requirements and regional data center login flags.

Where This Fits in a Broader Zoho Environment

If your organization runs Zoho Flow or has custom scripts that interact with other Zoho products, the ZMail CLI opens up some interesting possibilities for tying mail operations into automated workflows without needing to build a full API integration from scratch. It’s not a replacement for the API — the API gives you more programmatic flexibility — but for admins who want to script routine checks or incorporate mail account management into existing shell scripts, it’s a much lower barrier to entry.

The setup requires Java 17 or higher, which is worth confirming before you get started. If you manage a larger org and want to test this before rolling it out, start with a few read-only commands — account list, orgManagement getOrgSubscription — to get a feel for the output format before you use it for anything that writes or modifies data.