Child pages
  • cPanel API 1 Functions - SpamAssassin::saveconfig

Versions Compared

Key

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

Description

Excerpt

This function saves Apache SpamAssassin's™ configuration information.

Include Page
LIB:_cPanelAPI1NoEquivalent
LIB:_cPanelAPI1NoEquivalent
Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$save_config = $cpanel->api1('SpamAssassin', 'saveconfig', array('blacklist_from1-user@example.com','blacklist_from2-auser@example.com '5', 'Spam_Rule 333', 'whitelist_from1-username@example.com', 'whitelist_from2-otherusername@example.com') ); // Call the function.

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.
my $save_config = $cpliveapi->api1('SpamAssassin', 'saveconfig', ['blacklist_from1-user@example.com','blacklist_from2-auser@example.com '5', 'Spam_Rule 333', 'whitelist_from1-username@example.com', 'whitelist_from2-otherusername@example.com'] ); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="SpamAssassin::saveconfig( $FORM('blacklist_from1', 'blacklist_from2','required_score','score', 'whitelist_from1', 'whitelist_from2') )">



Expand
titleCommand Line


Code Block
languagebash
cpapi1 --user=username SpamAssassin saveconfig user@example.com auser@example.com 5 "SPAM_RULE 3 3 3 3" username@example.com otherusername@example.com

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote


Expand
titleOutput (none)

This function does not return output.



Parameters

ParameterTypeDescriptionPossible valuesExample
blacklist_from-*string

Required

The email address or addresses to blacklist.

 

A valid email address.

Note
titleNote:

Increment the values to specify more than one address. For example, blacklist_from1-user@example.com, blacklist_from2-auser@example.com


blacklist_from1-user@example.com
required_scoreinteger

Required

The score above which the server classifies an email message as spam.

An integer between 1 and 10. 5
score-*string

Required

Assign spam scores to individual spam rules.

 

A individual test score.

For more information about how to format spam rule scores, read our Spam Filters documentation.

SPAM_RULE 3 3 3 3
whitelist_fromstring

Required

The email address or addresses to whitelist.

 

A valid email address.

Note
titleNote:

Increment the values to specify more than one address. For example, whitelist_from1-username@example.com, whitelist_from2-otherusername@example.com


whitelist_from1-username@example.com

Returns

This function does not return output.