Create default email address
This function configures a default (catchall) email address.
Important:
When you disable the Mail Receive role, the system disables this function.
Query parameters
The method to use to handle unroutable mail.
- fwd — Forward messages to the fwdemail parameter’s address.
- fail — Bounce messages back to the sender, and include the failmsgs parameter’s failure message.
- blackhole — Send messages to the /dev/null/ directory. This method does not generate a failure notice.
- pipe — Pipe mail to the pipefwd parameter’s application. This parameter requires the File Storage role.
The domain whose default email behavior you want to configure.
Note:
This parameter defaults to the cPanel account’s main domain.
The failure message for the message’s sender.
Note:
Use this parameter if you used the fail method for the fwdopt parameter.
The email address to which the system forwards messages.
Note:
Use this parameter if you used the fwd method for the fwdopt parameter.
The application to which the system pipes messages.
Note:
Use this parameter if you used the pipe method for the fwdopt parameter.
Important:
This parameter requires the File Storage role.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "set_default_address",
"module": "Email",
"result": {
"data": [
{
"dest": "admin@example.com",
"domain": "example.com"
}
],
"metadata": {
"transformed": 1
},
"status": 1
}
}