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 WHM API 1 unset_manual_mx_redirect function.
domain required | string 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. Example: |
mx required | string The domain or IP address (IPv4 or IPv6) 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. Example: |
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ set_manual_mx_redirects \ domain='example.com' \ mx_host='mailhostexample.com'
{- "data": {
- "payload": {
- "example.com": "mailhostexample.com",
- "example.org": null
}
}, - "metadata": {
- "command": "set_manual_mx_redirects",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}