Update minimum spam score threshold value

This function sets a new minimum Apache SpamAssassin™ spam score threshold value.

Notes:

  • To disable spam filtering, use the UAPI Email::disable_spam_autodelete fuction.
  • For more information, read our Spam Filters documentation.

Important:

SecurityBasicAuth
Request
query Parameters
account
string <email>

The email account to apply a spam score threshold value.

Note:

If you do not specify a value, the function applies the new spam score threshold value to all accounts.

Example: account=username@example.com
required_score
string >= 1
Default: 5

Set a spam score threshold value.

Notes:

  • You must specify a value greater than 0, and lower than the domain owner's spam score threshold value.
  • You cannot enter 0 as a value for this parameter.
  • You can retrieve the domain owner‘s spam score threshold value via the cpuser_spam_auto_delete_score return from the UAPI Email::get_spam_settings function.
  • The default value, 5, is an aggressive spam score.
  • The lower the spam score, the more likely that Apache SpamAssassin will label messages as spam and delete them.
  • Some systems may wish to use a more lenient spam score (for example, 8 or 10).
Example: required_score=8
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Email/add_spam_filter
Request samples
uapi --output=jsonpretty \
  --user=username \
  Email \
  add_spam_filter
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "add_spam_filter",
  • "module": "Email",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": {
      • "transformed": 1
      },
    • "status": 1,
    • "warnings": null
    }
}