Create domain-level forwarder

This function creates a domain-level forwarder.

Important:

When you disable the Receive Mail role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
destdomain
required
string <domain>

The domain to receive forwarded mail.

Example: destdomain=forwardtome.com
domain
required
string <domain>

The domain on the cPanel account from which to forward mail.

Example: domain=example.com
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/add_domain_forwarder
Request samples
uapi --output=jsonpretty \
  --user=username \
  Email \
  add_domain_forwarder \
  domain='example.com' \
  destdomain='forwardtome.com'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "add_domain_forwarder",
  • "module": "Email",
  • "result": {
    • "data": "File updated \"/etc/vdomainaliases/example.com\"",
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}