Update SpamAssassin™ settings

This function sets the Apache SpamAssassin™ settings for the account.

Note:

Additional customizations may appear in the function's return. For more information, read the Apache SpamAssassin configuration file documentation.

SecurityBasicAuth
Request
query Parameters
preference
required
string

The variable that you want to manipulate.

Important:

  • You can only choose one of these possible values per call.
  • If you enter a value for the preference parameter, but you do not define a value for the value parameter, the function will remove any previous settings.
Example: preference=score
value
string

The value for the preference of the variable that you want to manipulate.

  • A valid SpamAssassin "TEST_NAME SCORE" value when the value of the preference parameter is score, where:

    • TEST_NAME represents the symbolic name of the test. For list of symbolic test names, run the UAPI SpamAssassin::get_symbolic_test_names function.
    • SCORE represents the floating-point value that SpamAssassin assigns to the mail when the test result is true. The score value must be greater than 0, and less than 1000.
  • A valid floating-point number if the value of the preference parameter is required_score.

  • A valid email address if the value of the preference parameter is whitelist_from or blacklist_from.

  • A custom SpamAssassin variable value.

Note:

To enter multiple values, increment the parameter name. For example, use the value-0 and value-1 parameters.

Examples:
value=value-0=ACT_NOW_CAPS 5.0 value-1=INVALID_DATE 3.2
value=ACT_NOW_CAPS 5.0
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/SpamAssassin/update_user_preference
Request samples
uapi --output=jsonpretty \
  --user=username \
  SpamAssassin \
  update_user_preference \
  preference='score'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "update_user_preference",
  • "module": "SpamAssassin",
  • "result": {
    • "data": {
      • "blacklist_from": [
        • "username2@example.com"
        ],
      • "ok_locales": [
        • "all"
        ],
      • "required_score": [
        • 5
        ],
      • "score": [
        • "ACT_NOW_CAPS 5"
        ],
      • "whitelist_from": [
        • "username@example.com"
        ]
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}