Create Filter
createFilterCreate a Thunderbird mail filter rule on an account using conditions and actions, including move, tag, forward, or reply, with sending rules requiring user confirmation.
Instructions
Create a mail filter rule on an account. A rule that forwards or replies, or any new rule in a list already holding a sending rule, is refused by default ("Filter rules that send mail: Always block"); with "Ask me each time" the call returns {status: "pending_user_confirmation", confirmationId} and Thunderbird asks the user, who alone can accept (follow up with listFilters, confirmation: true). Forward takes one plain address; reply takes a Templates message (?messageId=&subject=). Sending rules on outgoing mail, archiving or periodic runs (type 64, 128, 256) are always refused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Filter name | |
| type | No | Filter type bitmask (default: 17 = inbox + manual). 1=inbox, 16=manual, 32=post-plugin, 64=post-outgoing | |
| actions | Yes | Array of actions to perform | |
| enabled | No | Whether filter is active (default: true) | |
| accountId | Yes | Account ID | |
| conditions | Yes | Array of filter conditions | |
| insertAtIndex | No | Position to insert (0 = top priority, default: end of list) |