pmg_ruledb_rule_create
Create a PMG RuleDB rule with defined name, priority, and optional matching logic. Dry-run by default; execute with confirm=True to get the rule ID.
Instructions
MUTATION (MEDIUM): create a PMG RuleDB rule. Dry-run by default. confirm=True to execute. Needs PROXIMO_PMG_* config. PMG 9.1 pmgsh-verified path: POST /config/ruledb/rules. name: rule name. priority: 0-100 (lower = higher priority). active: DEFAULTS TO FALSE — rules control live mail processing; only activate when the rule configuration and group attachments have been verified. direction: 0=inbound, 1=outbound, 2=both. from_and/from_invert/to_and/to_invert/what_and/what_invert/when_and/when_invert: optional bool flags for AND/invert logic (map to hyphen-param API names). Returns the numeric rule ID assigned by PMG on confirm.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| active | No | ||
| to_and | No | ||
| confirm | No | ||
| from_and | No | ||
| priority | Yes | ||
| what_and | No | ||
| when_and | No | ||
| direction | No | ||
| to_invert | No | ||
| from_invert | No | ||
| what_invert | No | ||
| when_invert | No | ||
| proximo_target | No | Which configured Proxmox target to run this call against — a target name from your multi-target config (a specific PVE/PBS/PMG/PDM box). Omit to use the single/default target from the environment; the selection applies only to this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |