Description
This function tests mail filters. The function only tests filters for the cPanel account's main domain, and only tests against the message's body.
For more information about Exim filters, read Exim's documentation.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Email::trace_filter
— This function tests mail filters.
Note:
In cPanel & WHM version 11.50 and later, if the domain or account does not contain a filter file, this function will fail.
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 test a user-level filter. If you do not use this parameter, the function tests an account-level filter. |
|
user |
filtername |
string |
Required The filter name. |
The name of a filter on the account. |
coffee |
Returns
Return |
Type |
Description |
Possible values |
Example |
trace |
string |
A series of messages that describe the trace results. |
A series of strings. Note: This output may contain HTML. |
|
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 |