Description
This function tests an account's email filters.
Notes:
- This function only tests filters for a cPanel account's main domain that search the body of email messages.
- In cPanel & WHM version 11.50 and later, if the domain or account does not contain a filter file, this function will fail.
Warning:
- UAPI (recommended) —
Email::trace_filter
— This function tests mail filters. - cPanel API 2 —
Email::tracefilter
— This function tests mail filters.
Examples
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
account |
string |
The name of the email account. Note: This function tests old-style cPanel filters in the account's /home/filters directory only. If you do not specify a value, the function tests the main domain's filters in the /etc/vfilters/directory. |
An email account on the server. |
user@example.com |
msg |
string |
Required The string to test filters against. |
Any string. |
This email is filtered. |
Returns
This function returns a message of success or failure, the name of the file that the function examined, and the destination of the filter.