This function sets the BoxTrapper blocklist configuration rules. BoxTrapper will delete messages that match these rules and send a notification to the sender.
Important:
When you disable the Receive Mail role, the system disables this function.
email required | string <email> A valid email address on the cPanel account. Warning: If you call this function in Webmail, the system overrides this parameter. This parameter defaults to the current email address. Example: email=user@example.com |
rules required | Array of strings An array of blocklist rules. Note: You can set multiple block rules, duplicate or increment the parameter name. For example,
rules=rules-1='blocklisted-email\@domain\.com' rules-2='from blocklisted-email2\@domain\.com' rules-3='to domain2\.com' rules=rules='blocklisted-email\@domain\.com' rules='from blocklisted-email2\@domain\.com' rules='to domain2\.com' rules=blocklisted-email\@domain\.com |
apiversion | integer The version of the API. |
func | string The name of the method called. |
module | string The name of the module called. |
object |
uapi --user=username BoxTrapper set_blocklist email='user@example.com' rules-1='blocklisted-email\@domain\.com' rules-2='from blocklisted-email2\@domain\.com' rules-3='to domain2\.com'
{- "apiversion": 3,
- "func": "set_blocklist",
- "module": "BoxTrapper",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}