Add manual MX redirection

This function lets you create a manual Exim mail exchanger (MX) redirect for a domain. An MX redirection lets you bypass the domain's MX lookup via the Domain Name System (DNS). This function adds the manual redirect entries to the /etc/manualmx file.

Note:

To remove a domain's manual MX redirection, use the UAPI Email unset_manual_mx_redirect function.

SecurityBasicAuth
Request
query Parameters
domain
required
string <domain>

The domain for which to add a manual MX redirect entry.

Note:

  • To add multiple domain entries, increment the parameter. For example, use the domain, domain-1, and domain-2 parameters.
  • For multiple domains, you must include its corresponding mx_host value.
Examples:
domain='example.com'
domain=example.com&domain-1=example1.com&domain-2=example2.com
required
string or string or string

The domain, IPv4, or IPv6 address to redirect the domain value's emails to.

Note:

  • To add multiple MX hosts, increment the parameter. For example, use the mx_host, mx_host-1, and mx_host-2 parameters.
  • For multiple MX hosts, you must include its corresponding domain value.
Examples:
mx_host='mailhostexample'
mx_host=mailhostexample&mx_host-1=mailhostexample&mx_host-2=mailhostexample
Responses
200

HTTP Request was successful.

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
get/Email/set_manual_mx_redirects
Request samples
uapi --output=jsonpretty --user=username Email set_manual_mx_redirects domain='example.com' mx_host='mailhostexample.com'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "set_manual_mx_redirects",
  • "module": "Email",
  • "result": {
    • "data": {
      • "example.com": "mailhostexample.com"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}