# Create email filter This function creates a new email filter. For more information about Exim filters, read Exim's documentation. When you disable the role, the system this function. ### Create multiple rules You may create up to 4,096 separate sets of conditions in one filter. To do this, append numbers to the parameter names. To create a filter with two sets of actions and conditions, use the following parameters: * Assign the information for the first filter rule to the , , , , , and parameters. * Assign the information for the second filter rule to the , , , , , and parameters. To create a filter that uses one set of actions but two sets of conditions, use the following parameters: * Assign the actions to the and parameters. * Assign the first set of conditions to the , , , and parameters. * Assign the second set of conditions to the , , , and parameters. Endpoint: GET /Email/store_filter Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `action*` (any, required) The filter's action. * - Deliver the message to the address. * - Force a delivery failure. * - Stop processing the message. * - Save the message to the file. * - Pipe the message to the application. * You increment each action. For example, pass the first action as and the second action as . * This value the role. For more information, read our How to Use Server Profiles documentation. - `filtername` (string, required) The filter name. Example: "coffee" - `match*` (any, required) The filter's match type. * If the parameter is a string, use a string operator. * If the parameter is an integer, use a numeric operator. String operators: * * * * * * * * * Numeric operators: * * * * You increment each match type. For example, pass the first match type as and the second match type as . - `part*` (any, required) The email section to query. * - Match against the message's spam score value, measured in plus() characters. * - Match against the message's spam score value. * - Match against whether the system detected the message as spam. * - Match against the message's header value. * - Match against the section. * - Match against the section. * - Match against the section. * - Match against the section. * - Match against the message's body. * - Match against the message's headers. * - Match against all message recipients. * - Match if the message is not queued for delivery. * - Match if the incoming message is bounced. You increment each section. For example, pass the first section as and the second section as . Generally, the recipient does receive the field in an email's header. For this reason you use the field in a filter. - `val*` (any, required) The value to match. You increment each value. For example, pass the first value as and the second value as . - `account` (string) The email address, for user-level filters. If you do not use this parameter, the function creates an account-level filter. Example: "user@example.com" - `dest*` (any) The destination for filtered mail. * This parameter is if the action value is , , or . * You increment each destination. For example, pass the first destination as and the second destination as . - `oldfiltername` (string) The name of an existing filter, to rename it. If you do not use this parameter, the function creates a new filter. Example: "pool" - `opt*` (any) The connection between multiple conditions. You increment each connection. For example, pass the first connection as and the second connection as . ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "store_filter" - `module` (string) The name of the module called. Example: "Email" - `result` (object) - `result.data` (object) - `result.data.account` (string) The filter's email address. The function only returns this value if it created a user-level filter. Example: "user@example.com" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.metadata.transformed` (integer) Post-processing may have transformed the data. Enum: 1 - `result.status` (integer) * - Success * - Failed. Check the errors field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.