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.
Note:
If the domain or account does not contain a filter file, this function will fail.
Important:
When you disable the Receive Mail role, the system disables this function.
uapi --output=jsonpretty \ --user=username \ Email \ trace_filter \ msg='Test'
{- "apiversion": 3,
- "func": "trace_filter",
- "module": "Email",
- "result": {
- "data": {
- "trace": "Warning: no message headers read\\nReturn-path copied from sender\\nSender = user@example.com\\nRecipient = user@example.com\\nTesting Exim filter file "/etc/vfilters/example.com"\\n\\nFiltering did not set up a significant delivery.\\n<b>Normal delivery will occur.\\n</b>"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}