Our documentation is getting an overhaul! We would like your input! Click here to take a look at the beta launch of our new documentation site! Only cPanel & WHM version 82 documentation exists on our beta at this time. 84 will be added to the new site soon! Leave your feedback here: https://go.cpanel.net/docsfeedback
UAPI Functions - SpamAssassin::get_symbolic_test_names - Developer Documentation - cPanel Documentation
Child pages
  • UAPI Functions - SpamAssassin::get_symbolic_test_names
Skip to end of metadata
Go to start of metadata

Description

This function lists the Apache SpamAssassin™ scores for each symbolic test.

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/SpamAssassin/get_symbolic_test_names


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.

// List the Apache SpamAssassin™ scores for each symbolic test.
$sa_settings = $cpanel->uapi(
    'SpamAssassin', 'get_symbolic_test_names'
);


Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.

# List the Apache SpamAssassin™ scores for each symbolic test.
my $sa_settings = $cpliveapi->uapi(
    'SpamAssassin', 'get_symbolic_test_names'
);


Note:

For more information, read our Guide to the LiveAPI System.

 

 Command Line
uapi --user=username SpamAssassin get_symbolic_test_names


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
  "result" : {
     "data" : [
		{
        "key": "ACT_NOW_ALL_CAPS",
        "rule_type": "body_tests",
        "score": 1
        }, {
        "key": "SPAMMY_URI_PATTERNS",
        "rule_type": "body_tests",
        "score": 1
        }, {
        "key": "ADMAIL",
        "rule_type": "body_tests",
        "score": 1
        }
	 ]
  }
  "status" : 1,
  "messages" : null,
  "errors" : null
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample

array of hashes

This array of hashes includes the key, rule_type, and score returns.



key

string

The name of the test.

The function returns this value in the unnamed hash.

A valid test name.

ACT_NOW_ALL_CAPS

rule_type

string

The type and section of the email that the SpamAssasin analyses.

The function returns this value in the unnamed hash.

  • body_tests
  • full_evals
  • head_evals
  • head_tests
  • meta_tests
  • other_tests
  • rawbody_tests
  • uri_tests
body_tests

score

integer

The score to assign to the email if the result of the test is true.

The function returns this value in the unnamed hash.

A valid positive or negative real number or integer.

1