Child pages
  • UAPI Functions - Email::disable_spam_autodelete

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function

retrieves

disables the Apache SpamAssassin™

settings for the account

auto-delete spam feature.


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


Code Block
languagetext
https://hostname.example.com:2083/cpsess##########/execute/Email/getdisable_spam_settings?account=username%40example.comautodelete

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.

// ListDisable Apache SpamAssassin settingsspam auto-delete feature.
$sa_settings = $cpanel->uapi(
    'Email', 'getdisable_spam_settingsautodelete',

   array(
        'account' => 'username@example.com',
         )
);

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink
 


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.

# ListDisable Apache SpamAssassin settingsspam auto-delete feature.
my $sa_settings = $cpliveapi->uapi(
    'Email', 'getdisable_spam_settingsautodelete',

   {
        'account' => 'username@example.com'
    }
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 


Expand
titlecPanel Template Toolkit


Code Block
languagexml
<!-- ListDisable Apache SpamAssassin settingsspam auto-delete feature. -->
[% execute('Email', 'getdisable_spam_settingsautodelete', { 'account' => 'username@example.com' }) %]

Include Page
LIB:_TTLink
LIB:_TTLink

 


Expand
titleCommand Line


Code Block
languagebash
uapi --user=username Email getdisable_spam_settingsautodelete account=username%40example.com

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
"result" : {      "dataerrors" : {
        "spam_as_acl" : 1:null,
        "spam_auto_delete_score" : "8","data":{  
       "spam_enabled" : 1,
        "spam_auto_delete" : 0,
        "spam_status_changeable" : 1},
        "cpuser_spam_auto_delete" : 1"messages":null,
        "rewrites_subjects" : 1"warnings":null,
        "cpuser_spam_auto_delete_score" : 8,
        "spam_box_enabled" : 0
     },
     "status" : 1,
     "messagesmetadata" :{ null, 

   "errors" : null
  }
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExampleaccountstring

Retrieve a specific user account's Apache SpamAssassin settings.

Note
titleNote:

We added this parameter in cPanel & WHM version 70.

If you do not specify this parameter, the function returns the settings for the default account.

A valid user email account.username@example.com

This function does not accept parameters.

Returns

enabled

Whether the server's global spam filtering is enabled.

ReturnTypeDescriptionPossible valuesExample
spam_Boolean
Note
titleNote:

This will only return 0 if the cPanel user disables Apache SpamAssassin.

  • 1 — Enabled.
  • 0 — Not enabled.
1rewrites_subjectsBooleanWhether the user's spam filter rewrites the subject lines of spam messages.
  • 1 — Rewrite.
  • 0 — No rewrites.
1spam_status_changeableBoolean

Whether the server allows cPanel users to configure Apache SpamAssassin settings.

  • 1 — Allowed.
  • 0 — Not allowed.
1spam_as_aclBooleanWhether the user's spam filter uses Apache SpamAssassin as an Account Creation Limits (ACL).
  • 1 — SpamAssassin is an ACL.
  • 0 — SpamAssassin is not an ACL.
1spam_auto_deleteBooleanWhether the user's autodelete function is enabled.
  • 1 — Enabled.
  • 0 — Not enabled.
0spam_box_enabledBooleanWhether the user's spam box is enabled.
  • 1 — Enabled.
  • 0 — Not enabled.
0spam_auto_delete_scorestring

Displays the user's spam filter threshold.

Note
titleNote:

For more information, read our UAPI Email::add_spam_filter documentation.

  • The spam filter threshold value.
  • null

8

cpuser_spam_auto_deleteBoolean

Whether the cPanel user enabled an account-wide spam filter.

Note
titleNote:

We introduced this return in cPanel & WHM version 70.

  • 1 — Enabled.
  • 0 — Not enabled.
1cpuser_spam_auto_delete_scoreinteger

The cPanel user's account-wide spam filter threshold score.

Displays the spam filter value for the cPanel user's email account.

Note
titleNote:

We introduced this return in cPanel & WHM version 70.

  • The spam filter score value.
  • null
8auto_deleteBoolean

Whether the auto-delete spam feature is disabled.

0 is the only possible value.

0