Delete mail exchanger record

This function deletes a Mail Exchanger (MX) record. For more information about MX record settings, read our Email Routing Configuration documentation.

Important:

When you disable the DNS role, the system disables this function.

Authorizations:
query Parameters
domain
required
string <domain>

The mail exchanger's domain.

Example: domain=example.com
exchanger
required
string

The mail exchanger's name.

Example: exchanger=mail.example.com
priority
required
integer >= 1

The mail exchanger's priority value. If multiple MX entries match the exchanger value, the system uses this parameter to find the correct entry.

Example: priority=15

Responses

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object

Request samples

uapi --output=jsonpretty \
  --user=username \
  Email \
  delete_mx \
  domain='example.com' \
  exchanger='mail.example.com' \
  priority='15'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "delete_mx",
  • "module": "Email",
  • "result": {
    • "data": {
      • "checkmx": {
        • "changed": 1,
        • "detected": "auto",
        • "isprimary": 0,
        • "issecondary": 0,
        • "local": 0,
        • "mxcheck": "auto",
        • "remote": 0,
        • "secondary": 0,
        • "warnings": "Auto Detect of MX configuration not possible due to non-resolving MX entries. Defaulting to last known setting: local."
        },
      • "results": "Removed entry: example.com. IN MX 15 mail.example.com\nBind reloading on example using rndc zone: [example.com]",
      • "status": 1,
      • "statusmsg": "Removed entry: example.com. IN MX 15 mail.example.com\nBind reloading on example using rndc zone: [example.com]"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}