Description
This function configures the account's default address's rules for unroutable mail. The cPanel account's default (catchall) address handles unroutable mail that the account's domains receive.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Email::set_default_address
— This function configures a default (catchall) email address.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Note:
Make certain that you only pass necessary parameters to this function. The function adds all parameters to the default address's rules regardless of the fwdopt
setting.
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
Required The domain. |
A valid domain on the account. |
example.com |
fwdopt |
string |
Required The method to use to handle unroutable mail. |
|
fwd |
fwdemail |
string |
The email address to which the system forwards unroutable email. Note: Use this parameter if you used the fwdmethod for thefwdopt parameter. |
A valid email address. |
catchall@example.com |
failmsgs |
string |
The failure message to send to the sender of unroutable mail. This parameter defaults toNo such person at this address. Note: Use this parameter if you used the failmethod for thefwdopt parameter. |
A valid string. |
Nobody's home. |
pipefwd |
string |
The application to which the system pipes unroutable mail. Note: Use this parameter if you used the pipemethod for thefwdopt parameter. |
The location of a program or script, relative to the account's home directory. |
mailscript.pl |
Returns
Return |
Type |
Description |
Possible values |
Example |
domain |
string |
The domain. |
A valid domain on the account. |
example.com |
dest |
string |
The method that the system will use to handle unroutable mail. |
|
|
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |