This function sets the Mail Exchanger (MX) type.
Note:
This function only affects the cPanel configuration. You must configure the mail exchanger's DNS entry separately.
Important:
When you disable the DNS role, the system disables this function.
domain required | string <domain> The mail exchanger's domain. Example: domain=example.com |
alwaysaccept | string Default: "auto" The mail exchanger type.
Note: This parameter is redundant with the Example: alwaysaccept=auto |
mxcheck | string Default: "auto" The mail exchanger type.
Note: This parameter is redundant with the Example: mxcheck=auto |
uapi --output=jsonpretty \ --user=username \ Email \ set_always_accept \ domain='example.com'
{- "apiversion": 3,
- "func": "set_always_accept",
- "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."
]
}, - "detected": "auto",
- "local": 0,
- "mxcheck": "auto",
- "remote": 0,
- "results": "Set Always Accept Status to: local",
- "secondary": 0,
- "status": 1,
- "statusmsg": "Set Always Accept Status to: local"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}