Controller: MailSpam

API Controller /nodeworx/mail/spam
Required Permissions ["EMAIL"]
Action Description
addAdvanced Displays the add advanced form.
autoRestart Set the spamassassin auto-restart status.
deleteAdvanced Delete advanced spamassassin configuration.
editAdvanced Edit advanced spamassassin configuration.
isRunning Checks if the service is running or not.
isRunningOnNode Checks if the service is running on a specific node (Clustering only).
listGeneralName Lists the "normal" name - ie "web server" instead of "httpd".
listPortNumbers Lists a string of the port numbers that this service uses, comma-seperated.
listPortNumbersArray Lists array of port numbers and ranges that this service uses.
listPreferences Lists information about current spam preferences.
listRequiredPermissions Lists an array of permissions required to control the service.
listServiceInfo Lists the service name, ports, page, and status.
listServiceName Lists the service name - ie "httpd" instead of "web server".
listServicePage Lists the page that controls the service.
restart Restarts the service.
restartOnNode Restarts the service on a specific node (Clustering only).
start Starts the service.
startonboot Set the spamassassin start-on-boot status.
startOnNode Starts the service on a specific node (Clustering only).
stop Stops the service.
stopOnNode Stops the service on a specific node (Clustering only).
updateBayes Update spamassassin bayes configuration.
updateLists Update spamassassin global white and black lists.
updateOptions Update spamassassin options.

Action: addAdvanced

Displays the add advanced form.

Input Parameters

Name Type Notes Required?
preference string
Example Values
add_header, all_spam_to, always_trust_envelope_sender, auto_whitelist_db_modules, auto_whitelist_factor, bayes_auto_expire, bayes_auto_learn_threshold_nonspam, bayes_auto_learn_threshold_spam, bayes_expiry_max_db_size, bayes_ignore_from, bayes_ignore_header, bayes_ignore_header header_name, bayes_ignore_to, bayes_journal_max_size, bayes_learn_during_report, bayes_learn_to_journal, bayes_min_ham_num, bayes_min_spam_num, bayes_use_chi2_combining, bayes_use_hapaxes, blacklist_to, clear_headers, clear_report_template, clear_unsafe_report_template, dcc_body_max, dcc_fuz1_max, dcc_fuz2_max, dcc_timeout, def_whitelist_from_rcvd, describe, dns_available, envelope_sender_header, fold_headers, internal_networks, lock_method, more_spam_to, ok_languages, ok_locales, pyzor_max, pyzor_options, pyzor_timeout, razor_timeout, rbl_timeout, remove_header, report, report_charset, report_contact, report_hostname, report_safe_copy_headers, report_safe_copy_headers header_name, ...
Yes
value string Yes

Action: autoRestart

Set the spamassassin auto-restart status.

Input Parameters

Name Type Notes Required?
spam_autorestart integer
Example Values
1, 0
Example Default Value
0
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: deleteAdvanced

Delete advanced spamassassin configuration.

Input Parameters

Name Type Notes Required?
pref_id struct (integer) Yes

Action: editAdvanced

Edit advanced spamassassin configuration.

Input Parameters

Name Type Notes Required?
pref_id integer Yes
value string
Example Default Value
test
No*
* indicates that it's actually required, but probably already has a valid default value

Action: isRunning (Added in version 4.2.0-260)

Checks if the service is running or not.

Example Output

array (
  'status' => 0,
  'payload' => true,
)

Action: isRunningOnNode (Added in version 4.3.0-290)

Checks if the service is running on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: listGeneralName (Added in version 4.2.0-260)

Lists the "normal" name - ie "web server" instead of "httpd".

Example Output

array (
  'status' => 0,
  'payload' => '##LG_SPAM_FILTERING##',
)

Action: listPortNumbers (Added in version 4.2.0-260)

Lists a string of the port numbers that this service uses, comma-seperated.

Example Output

array (
  'status' => 0,
  'payload' => '783',
)

Action: listPortNumbersArray (Added in version 4.2.0-260)

Lists array of port numbers and ranges that this service uses.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 783,
  ),
)

Action: listPreferences (Added in version 4.8.0-393)

Lists information about current spam preferences.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    4 => 
    array (
      'prefid' => '4',
      'username' => '@GLOBAL',
      'preference' => 'add_header',
      'value' => 'test',
      'is_invalid_nw' => false,
      'is_invalid_sw' => false,
    ),
  ),
)

Action: listRequiredPermissions (Added in version 4.2.0-260)

Lists an array of permissions required to control the service.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 'EMAIL',
  ),
)

Action: listServiceInfo (Added in version 4.2.0-260)

Lists the service name, ports, page, and status.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    'id' => 'spamassassin',
    'name' => '##LG_SPAM_FILTERING##',
    'ports' => '783',
    'page' => '/nodeworx/mail/spam',
    'ctrl' => '/nodeworx/mail/spam',
    'is_running' => 1,
  ),
)

Action: listServiceName (Added in version 4.2.0-260)

Lists the service name - ie "httpd" instead of "web server".

Example Output

array (
  'status' => 0,
  'payload' => 'spamassassin',
)

Action: listServicePage (Added in version 4.2.0-260)

Lists the page that controls the service.

Example Output

array (
  'status' => 0,
  'payload' => '/nodeworx/mail/spam',
)

Action: restart (Added in version 4.2.0-260)

Restarts the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: restartOnNode (Added in version 4.3.0-290)

Restarts the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: start (Added in version 4.2.0-260)

Starts the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: startonboot

Set the spamassassin start-on-boot status.

Input Parameters

Name Type Notes Required?
startonboot integer
Example Values
1, 0
Example Default Value
1
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: startOnNode (Added in version 4.3.0-290)

Starts the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: stop (Added in version 4.2.0-260)

Stops the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: stopOnNode (Added in version 4.3.0-290)

Stops the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: updateBayes

Update spamassassin bayes configuration.

Input Parameters

Name Type Notes Required?
bayes_scanning integer
Help Entry
Use the dropdown to enable or disable bayes scanning. Given training, bayes will learn which emails are most likely spam and most likely ham(not spam) and deal with these emails according to your preferences.
Example Values
1, 0
Example Default Value
1
No*
bayes_auto_learn integer
Help Entry
Use the dropdown to enable or disable Bayes auto learning. If enabled, the system will automatically train the Bayes database by analyzing messages that have a score that strongly suggests that they are spam or non-spam.
Example Values
1, 0
Example Default Value
1
No*
bayes_imap_training integer
Help Entry
Use the dropdown to enable or disable IMAP training. With Bayes IMAP training enabled, there will be two folders created for all e-mail accounts on the system: "Learn Spam" and "Learn Ham". You can then put SPAM emails in the "Learn Spam" folder and non-spam in the "Learn Ham" folder. This will train the Bayes system on which emails are Spam and which are Ham (not Spam). The training occurs once daily, after which the folders' contents are purged.
Example Values
1, 0
Example Default Value
1
No*
bayes_imap_training_limit integer
Description
Per Day
Help Entry
The maximum number of e-mails that will be trained from each of the IMAP Training Folders, "Learn Spam" and "Learn Ham," each day.
Example Default Value
250
No*
global_bayes_database integer
Help Entry
Use the dropdown to enable or disable the Bayes global database. If enabled, all the Bayes data will be stored as a single global user. If disabled, each e-mail box user will have their own Bayes database to store bayesian data. "Disabled" is considered more effective for fighting Spam, but requires all e-mail users to train their messages individually, and uses more disk space, compared to the global database option.
Example Values
1, 0
Example Default Value
0
No*
* indicates that it's actually required, but probably already has a valid default value

Action: updateLists

Update spamassassin global white and black lists.

Input Parameters

Name Type Notes Required?
global_whitelist struct (string)
Help Entry
Use the whitelist textfield to enter email addresses or domains that are valid to send email from on a serverwide level.
No
global_blacklist struct (string)
Help Entry
Use the blacklist textfield to enter email addresses or domains that are not valid to send email from on a serverwide level.
No
trusted_networks struct (string)
Help Entry
Relay hosts added here are considered to not be potentially operated by spammers, open relays or open proxies.
No

Action: updateOptions

Update spamassassin options.

Input Parameters

Name Type Notes Required?
smtp_level_scanning integer
Help Entry
This option will scan all e-mail using the SpamAssassin content filter as the e-mail enters the server. The SMTP connection will be dropped only if the Spam Score is higher than the SMTP Spam Score option below. Otherwise, the e-mail will still be delivered to the recipient.

WARNING: You may not want to enable this setting. It has no bearing on the SpamAssassin setting in SiteWorx, so e-mail messages may be scanned twice if this setting is enabled.
Example Values
1, 0
Example Default Value
0
No*
smtp_level_spam_score double
Help Entry
SMTP Spam Score. This is the SpamAssassin score threshold at which the SMTP server will reject a message before local delivery begins. If you don't want to block any spam at the SMTP level, use a very high number.
Example Default Value
95
No*
rewrite_header_subject string
Help Entry
Emails marked as Spam will have the email subject rewritten with what is entered here.
No
report_safe integer
Help Entry
This option sets the method of delivering the actual e-mail spam message. The email can be sent unchanged but with the subject rewritten, it can be attached to an email from SpamAssassin, or it can be attached as plain text to an email from SpamAssassin.
Example Values
0, 1, 2
Example Default Value
1
No*
use_auto_whitelist integer
Help Entry
Enable or disable the SpamAssassin AutoWhitelist functionality.
Example Values
1, 0
Example Default Value
1
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value