Get your free beta license ↗
API operation · mail group
GET

/mail

First published 3 Oct 20260.1.0Unchanged since publication

Get the server's mail stack status and configuration

Who may call it
AdministratorResellerCustomer
Token scope, any of
mailreadall
Answers200 OK

The mail object reports whether the mail stack is enabled, installed, and running. It includes each daemon's version and whether it responds, plus counts of mailboxes and domains with mailboxes. If the mail stack is absent, daemons and running are null and domain_smarthosts is empty. The running field is also null if the overall running state is unknown.

The response includes the mail hostname, server IP addresses, trusted networks, server and domain smarthost settings, the server smarthost's SPF setting, and the server spam policy. The hostname_zone field contains the most specific DNS zone that matches the mail hostname, or null if there is no matching zone.

The response also includes webmail activation and verification status, the webmail URL even when webmail is inactive, and the status of BotMail and the antivirus service. It reports firewall closures for mail ports 25, 465, 587, 143, 993, 110, 995, and 4190 and for mail.extra_port when configured. It also includes the mail logging settings, the extra mail port, whether ManageSieve is public, the Redis service unit, and when the status was read. This operation requires an administrator and a token with the mail scope.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/mail" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "mail": {
    "account_domains": 1,
    "accounts": 1,
    "addresses": [
      "text"
    ],
    "antivirus": {
      "active": true,
      "enabled": true,
      "installed": true,
      "running": true,
      "signatures_at": "text"
    },
    "daemons": {
      "dovecot": {
        "running": true,
        "since": "text",
        "state": "up",
        "unit": "text",
        "version": "0.0.1"
      },
      "postfix": {
        "running": true,
        "since": "text",
        "state": "up",
        "unit": "text",
        "version": "0.0.1"
      },
      "rspamd": {
        "running": true,
        "since": "text",
        "state": "up",
        "unit": "text",
        "version": "0.0.1"
      },
      "store": {
        "running": true,
        "since": "text",
        "state": "up",
        "unit": "text",
        "version": "0.0.1"
      }
    },
    "domain_smarthosts": [
      {
        "domain": "example.com",
        "has_password": true,
        "host": "text",
        "port": 8443,
        "smarthost_user": "text",
        "tls": true,
        "user": "alice"
      }
    ],
    "enabled": true,
    "extra_port": "text",
    "hostname": "server.example.com",
    "hostname_zone": "text",
    "installed": true,
    "log_subjects": true,
    "managesieve_public": true,
    "policy": {},
    "read_at": "text",
    "running": true,
    "smarthost": {
      "has_password": true,
      "host": "text",
      "port": 8443,
      "tls": true,
      "user": "alice"
    },
    "smarthost_spf": "text",
    "store_unit": "text",
    "trusted_networks": [
      "text"
    ],
    "webmail": {
      "active": true,
      "url": "text",
      "verified": true
    }
  }
}

Errors

1 error, each a status and a sentence
401Authentication required
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/get-mail/