Description
This function lists mail filters.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Note:
We deprecated this function in cPanel & WHM version 11.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
account |
string |
The cPanel account name or email address, to limit results to that account's user-level filters. If you do not use this parameter, the function returns account-level filters. |
|
user |
Returns
Return |
Type |
Description |
Possible values |
Example |
actions |
array of hashes |
An array of hashes of the filter's actions. |
Each hash includes the dest andaction returns. |
|
dest |
string |
The destination to which the filter sends mail. The function returns this value in theactions array. |
|
filteredmsgs@example.com |
action |
string |
The filter's action. The function returns this value in theactions array. |
|
deliver |
filtername |
string |
The filter name. |
A string value. |
coffee |
unescaped |
Boolean |
A legacy Boolean value. |
|
1 |
rules |
array of hashes |
An array of hashes of the filter's rules. |
Each hash includes the match, part,opt, and val returns. |
|
match |
string |
The filter's match type. The function returns this value in the rulesarray. |
|
contains |
part |
string |
The queried email section. The function returns this value in the rulesarray. |
|
$message_body |
opt |
string |
The connection between multiple conditions. The function returns this value in the rulesarray. |
|
and |
val |
string |
The matched value. The function returns this value in the rulesarray. |
A string value. |
coconut |
enabled |
Boolean |
Whether the filter is currently enabled. |
|
1 |
reason |
string |
A reason for failure. Note: This functiononly returns areason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |