pmg_ruledb_rule_create
Create a RuleDB rule for Proxmox Mail Gateway. Starts as a shell with dry-run mode to plan changes; activate with confirm=True.
Instructions
MUTATION (MEDIUM): create a PMG RuleDB rule. Dry-run by default.
Creates the rule shell only — attach condition/action groups afterward with pmg_ruledb_rule_from_attach and its sibling attach tools; list existing rules with pmg_ruledb_rules_list. active defaults False (live mail is affected only once active). confirm=True executes and returns {"status": "ok", "result": }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new RuleDB rule. | |
| active | No | Whether the rule is active on creation; defaults False since active rules affect live mail processing. | |
| to_and | No | AND (True) vs OR (False) logic across attached 'to' groups. | |
| confirm | No | False (default) returns a dry-run PLAN; True executes the mutation. | |
| from_and | No | AND (True) vs OR (False) logic across attached 'from' groups. | |
| priority | Yes | Rule priority 0-100; lower numbers are evaluated with higher priority. | |
| what_and | No | AND (True) vs OR (False) logic across attached 'what' groups. | |
| when_and | No | AND (True) vs OR (False) logic across attached 'when' groups. | |
| direction | No | Mail direction the rule applies to: 0=inbound, 1=outbound, 2=both. | |
| to_invert | No | If True, invert the 'to' group match. | |
| from_invert | No | If True, invert the 'from' group match. | |
| what_invert | No | If True, invert the 'what' group match. | |
| when_invert | No | If True, invert the 'when' group match. | |
| 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 |