The fields required to create a new email deny rule via POST /mail/rules. The type controls what data is matched against: - email — exact sender address match - domain — all senders from a domain - destination — exact recipient address match - startswith — sender local-part prefix match (alphanumeric + +_.- only)
| Name | Type | Description | Notes |
|---|---|---|---|
| user | str | Optional SMTP username of the mail order to associate this rule with (e.g. `mb20682`). If omitted the first active order is used. Valid usernames are the `username` values returned by `GET /mail`. | [optional] |
| type | str | The matching strategy for this rule. `email` blocks an exact sender address, `domain` blocks all senders at a domain, `destination` blocks an exact recipient address, and `startswith` blocks any sender whose local-part begins with the given prefix. | |
| data | str | The value to match against, interpreted according to `type`: a full email address for `email`/`destination`, a domain name for `domain`, or an alphanumeric prefix string for `startswith`. |
from openapi_client.models.deny_rule_new import DenyRuleNew
# TODO update the JSON string below
json = "{}"
# create an instance of DenyRuleNew from a JSON string
deny_rule_new_instance = DenyRuleNew.from_json(json)
# print the JSON string representation of the object
print(DenyRuleNew.to_json())
# convert the object into a dict
deny_rule_new_dict = deny_rule_new_instance.to_dict()
# create an instance of DenyRuleNew from a dict
deny_rule_new_from_dict = DenyRuleNew.from_dict(deny_rule_new_dict)