Skip to content
Mail The org-wide Mail hub. One mail host for every domain, people, groups and shared mailboxes, sign-in pages on your own domain, Cloudflare forwarding, sending providers, deliverability, delivery tracking, and the admin and mailbox APIs.

Mail

Mail (/mail) runs email for your domains on your own servers, instead of buying a hosted mailbox service. One server in your fleet is the mail host and serves every mail domain (Postfix, Dovecot and OpenDKIM, with Rspamd and optional ClamAV). People read mail in a webmail app on a sign-in page with your own address and brand. You can also skip the mail host entirely and just forward a domain with Cloudflare Email Routing. The hub is free on every plan during its build period, and the mail APIs are on every plan.

  1. Open Mail in the sidebar. With no mail host and no forwarding yet, a setup wizard asks How do you want mail?
    • Your company: real mailboxes on a mail host.
    • Forwarding: forward a domain’s addresses to existing inboxes with Cloudflare. Free, and no server needed. You can add the other way later.
  2. For mailboxes, pick the server that runs your mail (about 1 GB RAM free is enough). MZPanel installs Postfix, Dovecot and OpenDKIM and streams the log.
  3. Add your first domain: pick a site’s domain or type any domain you own. MZPanel shows the MX, SPF, DKIM and DMARC records. If the domain is in a connected Cloudflare zone, Publish to Cloudflare writes them for you.
  4. Add the first person (usually you): full name and address. Either set a password now, or let them choose their password from an invite link you share.
  5. Open the sign-in page and log in to webmail.

The page is one screen: a header with the mail host’s status, counts and sign-in page link, a Manage menu, the overview (needs attention), and the People table.

  • People: add one person or paste a list, invite, suspend, offboard, reset a password, set quota, aliases (more addresses), forwarding and an autoresponder. The person drawer also holds that mailbox’s API keys.
  • Groups and shared mailboxes: distribution lists and team inboxes (for example support@) that several people can read.
  • Manage menu:
    • Domains: receiving, sending and DNS for each mail domain, with a live DNS check.
    • Routing: forwarding addresses, catch-all and Cloudflare Email Routing.
    • Sending: how mail leaves your servers (direct, a smarthost relay, Cloudflare Email Sending, Resend or Amazon SES), plus test mail.
    • Deliverability: reputation, SPF, DKIM and DMARC checks, PTR and blocklist preflight, DMARC reports and sent stats.
    • Track delivery: every message the mail host sent, received or refused, and where each one went.
  • Settings: the mail host, the mail server name, the primary sign-in domain, sign-in pages (white-label hosts with your name, colors and certificate) and organization policies (for example who may create mailbox API keys).
  • Import existing mail over IMAP or from an mbox file.

The per-server page /servers/:id/mail redirects here (/mail?settings=host).

The hub reads GET /v1/servers/mail/all (the cached mail inventory of every server, so it renders instantly and includes offline boxes) and GET /v1/mail/settings for the host. Changes are mail.* jobs on the mail host, run natively by the agent, for example mail.install, mail.domain-add, mail.mailbox-add, mail.alias-set, mail.mailbox-forward, mail.group-set, mail.shared-set, mail.portal-add, mail.policy-set and mail.delivery-log. Cloudflare forwarding and sending-provider setup are control-plane calls under /v1/mail/*. Provider keys are kept on the mail host, not on the control plane.

There are two APIs.

Admin API (control plane, every plan). Your mzmcp_ token, over MCP or REST:

TaskMCP toolREST
Fleet mail viewservers_mail_allGET /v1/servers/mail/all
Mail host and sign-in domainmail_settings_get, mail_settings_set (level full)GET/PUT /v1/mail/settings
Domains, mailboxes, aliases, groups, policiesjobs_schema + jobs_create with mail.* kinds on the mail hostPOST /v1/servers/{id}/jobs
Cloudflare forwardingmail_cf_zones, mail_cf_domain, mail_cf_enable, mail_cf_rule_create / _update / _delete, mail_cf_catch_all, mail_cf_destination_add/v1/mail/cf/*
Cloudflare Email Sendingmail_cf_permissions, mail_cf_sending_setup, mail_cf_sending_apply/v1/mail/cf/domains/{domain}/sending[/apply]
Resend / Amazon SESmail_providers_list, mail_providers_create, mail_provider_domain_add, mail_provider_domain_check, mail_provider_apply (adding a provider needs webhooks:admin)/v1/mail/providers/*
Read and send box mailmail_folders, mail_messages_list, mail_message_get, mail_inbox_all, mail_draft_save, mail_message_send, mail_messages_modify/v1/mail/servers/{serverId}/mailboxes/{address}/*

Reading mail needs the opt-in scope mail:read, sending mail:send, and changing messages (flag, move, delete) mail:modify. A token can also carry a mailbox allowlist. Deleting a domain or mailbox needs data:delete. Webmail login links and mailbox API keys are never available to API tokens.

Mailbox API (on the mail host). For one mailbox’s integrations (a CRM, Zapier, a support tool): create a key in the person drawer (API keys) or let the person create one in webmail settings. Keys look like mzmb_<id>_<secret>, carry read, modify and send scopes, are shown once, and are revoked automatically when the person is suspended, offboarded or deleted, or an admin resets their password. Call https://<sign-in host>/api/v1/… with Authorization: Bearer mzmb_…; the spec is at /api/v1/openapi.json.

Webhook. Subscribe a developer webhook (Pro) to mail.received to be told about new mail.

  • Outbound port 25 is often blocked by VPS providers. The preflight warns about it; use a relay or a sending provider. It never blocks setup.
  • Inbound mail ports (25, 465, 587, 993) must be allowed by the server’s own firewall. The preflight’s “Inbound mail ports” check lists any that ufw/firewalld blocks, and Open ports in the Deliverability drawer allows them. A provider-level firewall in front of the server is outside its view.
  • A domain whose MX points at this server or a private address (e.g. localhost.example.com → 127.0.0.1) can’t be delivered to directly: the message bounces once with 550 5.4.6 instead of looping.
  • PHP mail() from your sites goes out with the envelope sender noreply@<site domain>, so bounces reach the site’s domain rather than the server hostname. A site or app that sets its own sender keeps it.
  • PHP mail() needs a mail server on the same box. On a server without one (no /usr/sbin/sendmail), mail() returns false and the message is dropped: contact forms and password resets never arrive. On a mail host with Sending off, every message bounces. The dashboard shows “PHP mail() can’t send from this server” on the server’s PHP page, the site’s Hosting page and the WordPress Overview’s Needs attention list. Fix it by setting the server up as a mail host (or turning Sending on), or by sending through SMTP instead (an SMTP plugin in WordPress pointed at your mail host or a provider). API and MCP clients read it as mail_delivery in the facts inventory (servers_inventory {id, kind: "facts"}).
  • PTR (reverse DNS) is set at your VPS provider, not in DNS. MZPanel detects and explains a mismatch but cannot fix it.
  • New IPs have little reputation. Send low volume at first; sent stats show a warm-up hint.
  • Turning on Cloudflare forwarding replaces existing MX records, and the old service stops receiving mail for that domain. The dashboard warns first; the API needs confirm: true (mail_cf_enable).
  • Forward targets must confirm. Cloudflare emails each new destination once; mail is forwarded only after the link is clicked.
  • 409 no_mail_host. Adding a sending provider needs a mail host first.