add_mail_rule
ActiveTool of run.domani/domani
Add an inbound filtering rule to a mailbox. If a message matches (by from/to/subject/body), the action runs: drop, mark_read, forward (to action_arg), webhook_only (skip forward-to), or label (with action_arg). Rules run in priority order (lower first); first match wins. API: POST /api/emails/{address}/rules.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"domain",
"slug",
"match_field",
"match_op",
"match_value",
"action"
],
"properties": {
"slug": {
"type": "string",
"description": "Mailbox slug"
},
"action": {
"enum": [
"drop",
"mark_read",
"forward",
"webhook_only",
"label"
],
"type": "string",
"description": "What to do on match"
},
"domain": {
"type": "string",
"description": "Mailbox domain"
},
"enabled": {
"type": "boolean",
"description": "Default true"
},
"match_op": {
"enum": [
"contains",
"equals",
"regex"
],
"type": "string",
"description": "How to match"
},
"priority": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "Lower runs first (default 0)"
},
"action_arg": {
"type": "string",
"description": "For 'forward': the destination email. For 'label': the label value."
},
"match_field": {
"enum": [
"from",
"to",
"subject",
"body"
],
"type": "string",
"description": "Which field to match on"
},
"match_value": {
"type": "string",
"description": "The value/pattern to match"
}
}
}No endpoints wrapped at confidence ≥ 0.50.
Parent server
run.domani/domani
https://github.com/gwendall/domani
1/7 registries