Chapter 34: Controller: /nodeworx/mail/smtp2 Up Part II: NodeWorx API Spec Chapter 36: Controller: /nodeworx/mail/spop3 

35 Controller: /nodeworx/mail/spam

Required Permissions "EMAIL"
Action: addAdvanced
Added in version 4.7.0-339
Description 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_auth, 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, ...
Yes
value string Yes
Action: autoRestart
Added in version 4.7.0-339
Description 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
Added in version 4.7.0-339
Description Delete advanced spamassassin configuration.
Input Parameters
Name Type Notes Required?
pref_id struct (integer) Yes
Action: editAdvanced
Added in version 4.7.0-339
Description 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.7.0-339
Description Checks if the service is running or not.
Sample output
array (
’status’ => 0,
’payload’ => true,
)
Action: isRunningOnNode
Added in version 4.7.0-339
Description 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.7.0-339
Description Lists the "normal" name - ie "web server" instead of "httpd".
Sample output
array (
’status’ => 0,
’payload’ => ’##LG_SPAM_FILTERING##’,
)
Action: listPortNumbers
Added in version 4.7.0-339
Description Lists a string of the port numbers that this service uses, comma-seperated.
Sample output
array (
’status’ => 0,
’payload’ => ’783’,
)
Action: listPortNumbersArray
Added in version 4.7.0-339
Description Lists array of port numbers and ranges that this service uses.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => 783,
),
)
Action: listPreferences
Added in version 4.8.0-393
Description Lists information about current spam preferences.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
6 =>
array (
’prefid’ => ’6’,
’username’ => ’@GLOBAL’,
’preference’ => ’add_header’,
’value’ => ’test’,
’is_invalid_nw’ => false,
’is_invalid_sw’ => false,
),
5 =>
array (
’prefid’ => ’5’,
’username’ => ’@GLOBAL’,
’preference’ => ’bayes_auto_learn’,
’value’ => ’1’,
’is_invalid_nw’ => true,
’is_invalid_sw’ => false,
),
1 =>
array (
’prefid’ => ’1’,
’username’ => ’@GLOBAL’,
’preference’ => ’report_safe’,
’value’ => ’1’,
’is_invalid_nw’ => true,
’is_invalid_sw’ => true,
),
3 =>
array (
’prefid’ => ’3’,
’username’ => ’@GLOBAL’,
’preference’ => ’rewrite_header subject’,
’value’ => ’’,
’is_invalid_nw’ => true,
’is_invalid_sw’ => true,
),
2 =>
array (
’prefid’ => ’2’,
’username’ => ’@GLOBAL’,
’preference’ => ’use_auto_whitelist’,
’value’ => ’1’,
’is_invalid_nw’ => true,
’is_invalid_sw’ => false,
),
4 =>
array (
’prefid’ => ’4’,
’username’ => ’@GLOBAL’,
’preference’ => ’use_bayes’,
’value’ => ’1’,
’is_invalid_nw’ => true,
’is_invalid_sw’ => false,
),
),
)
Action: listRequiredPermissions
Added in version 4.7.0-339
Description Lists an array of permissions required to control the service.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => ’EMAIL’,
),
)
Action: listServiceInfo
Added in version 4.7.0-339
Description Lists the service name, ports, page, and status.
Sample 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.7.0-339
Description Lists the service name - ie "httpd" instead of "web server".
Sample output
array (
’status’ => 0,
’payload’ => ’spamassassin’,
)
Action: listServicePage
Added in version 4.7.0-339
Description Lists the page that controls the service.
Sample output
array (
’status’ => 0,
’payload’ => ’/nodeworx/mail/spam’,
)
Action: queryAutoRestart
Added in version 5.1.0-838
Description Displays the information available to the action "autoRestart".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’spam_autorestart’ => ’0’,
),
)
Action: queryEditAdvanced
Added in version 5.1.0-838
Description Displays the information available to the action "editAdvanced".
Input Parameters
Name Type Notes Required?
pref_id integer Yes
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’preference’ => ’add_header’,
’value’ => ’test’,
’pref_id’ => ’6’,
),
)
Action: queryUpdateBayes
Added in version 5.1.0-838
Description Displays the information available to the action "updateBayes".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’bayes_scanning’ => ’1’,
’bayes_auto_learn’ => ’1’,
’bayes_imap_training’ => ’1’,
’bayes_imap_training_limit’ => ’250’,
’global_bayes_database’ => ’0’,
),
)
Action: queryUpdateLists
Added in version 5.1.0-838
Description Displays the information available to the action "updateLists".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’global_whitelist’ =>
array (
),
’global_blacklist’ =>
array (
),
’trusted_networks’ =>
array (
),
),
)
Action: queryUpdateOptions
Added in version 5.1.0-838
Description Displays the information available to the action "updateOptions".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’smtp_level_scanning’ => ’0’,
’smtp_level_spam_score’ => ’95’,
’spam_max_filesize’ => ’262144’,
’rewrite_header_subject’ => ’’,
’report_safe’ => ’1’,
’use_auto_whitelist’ => ’1’,
),
)
Action: restart
Added in version 4.7.0-339
Description 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.7.0-339
Description 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.7.0-339
Description 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
Added in version 4.7.0-339
Description 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.7.0-339
Description 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.7.0-339
Description 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.7.0-339
Description 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
Added in version 4.7.0-339
Description 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
Added in version 4.7.0-339
Description Update spamassassin global white and black lists.
Input Parameters
Name Type Notes Required?
global_whitelist struct (string) Help Entry
Use the whitelist text field to enter email addresses or domains that are valid to send email from on a server-wide level.
No
global_blacklist struct (string) Help Entry
Use the blacklist text field to enter email addresses or domains that are not valid to send email from on a server-wide level. To block all emails from a domain, use ’*’, as in ’*@domain.com’.
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
Added in version 4.7.0-339
Description 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.<br><br><strong>WARNING</strong>: 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
<b>SMTP Spam Score.</b> This is the SpamAssassin score threshold at which the SMTP server will reject a message before local delivery begins. If you do not want to block any spam at the SMTP level, use a very high number.
Example Default Value
95
No*
spam_max_filesize double Help Entry
Set the maximum message size to be scanned — any bigger than this threshold and the message will be returned unprocessed.
Example Default Value
262144
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
 Chapter 34: Controller: /nodeworx/mail/smtp2 Up Part II: NodeWorx API Spec Chapter 36: Controller: /nodeworx/mail/spop3 

(C) 2017 by InterWorx LLC