email_apply_rules
Scan an email folder and apply rules to move, mark, or delete messages. Supports substring, regex, or exact matching with case sensitivity. Use dry run to preview changes before executing.
Instructions
掃描 folder 後,依規則對信件做 move / mark / delete。預設:子字串、大小寫不敏感、first-match-wins(一封信只套第一條命中的規則)。可用 case_sensitive / match_mode 與每條規則的 match(substring|regex|exact) 調整。強烈建議先 dry_run=true 預覽命中數與前幾封,確認無誤再執行。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| rules | Yes | ||
| folder | No | INBOX | |
| search | No | 可選 IMAP search 先在 server 端縮小掃描範圍(大信箱建議用) | ALL |
| dry_run | No | ||
| match_mode | No | first=一封只套第一條命中規則;all=套用所有命中規則(執行優先序 move>delete>mark) | first |
| case_sensitive | No | 比對是否區分大小寫(預設否) |