pmg_what_object_add
Add an object to a Proxmox Mail Gateway 'what' object group. Dry-run by default; use confirm=True to execute the mutation.
Instructions
MUTATION (LOW): add an object to a PMG RuleDB 'what' object group. Dry-run by default.
To create the group first use pmg_what_group_create; list its objects with pmg_what_group_objects. If the group is already attached to a rule, the new object affects mail matching immediately. confirm=True executes and returns {"status": "ok", "result": <PMG's raw API response>}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | No | Mail header field name to match; used for type_='matchfield'. | |
| type_ | Yes | Object type: contenttype|matchfield|spamfilter|virusfilter|filenamefilter|archivefilter|archivefilenamefilter. | |
| value | No | Value/pattern to match against the field; used for type_='matchfield'. | |
| ogroup | Yes | Numeric 'what' object group ID (e.g. '8') from pmg_what_groups_list. | |
| confirm | No | False (default) returns a dry-run PLAN; True executes the mutation. | |
| filename | No | Filename pattern to match; used for type_='filenamefilter'/'archivefilenamefilter'. | |
| spamlevel | No | Spam score threshold; used for type_='spamfilter'. | |
| contenttype | No | MIME content type to match; used for type_='contenttype'/'archivefilter'. | |
| only_content | No | Match content only, not filename; maps to API param 'only-content'. | |
| top_part_only | No | Restrict match to the top MIME part only; maps to API param 'top-part-only'. | |
| 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 |