Chapter 74: Controller: /siteworx/email/remotesetup Up Part III: SiteWorx API Spec Chapter 76: Controller: /siteworx/email/spf 

75 Controller: /siteworx/email/spamprefs

Required Permissions "EMAIL"
Action: addAdvanced
Added in version 4.7.0-339
Description Add advanced spamassassin configuration options.
Input Parameters
Name Type Notes Required?
type string Example Values
domain, email
Example Default Value
domain
No*
username1 string Example Values
@~example.com, @~pointer.com
Example Default Value
@~example.com
No
username2 string No
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_sql_override_username, bayes_use_chi2_combining, bayes_use_hapaxes, blacklist_from, 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, ...
Yes
value string Yes
* 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 options.
Input Parameters
Name Type Notes Required?
pref_id struct (integer) Yes
Action: edit
Added in version 4.7.0-339
Description Edit spamassassin configuration settings.
Input Parameters
Name Type Notes Required?
enable_spam integer Help Entry
Shows the status of SpamAssassin as well as allows you to stop, start and restart the SpamAssassin service.
Example Values
1, 0
Example Default Value
0
No*
dropscore string Help Entry
This section lets you define what happens to spam once it has been tagged by SpamAssassin. The options are: <p>1. Deliver the Spam to an IMAP mailbox named "Spam", or if that box does not exist, the "Inbox". <p> 2. Delete Spam scored above a certain threshold, delivering all other Spam to the IMAP mailbox named "Spam".
Example Values
no
Example Default Value
no
No*
spamscore integer Description
(required_score)
Help Entry
Messages that are scored above this value will be tagged and identified as Spam by SpamAssassin. Messages with scores below this value will not be tagged as Spam.
Example Values
5, 7, 10
Example Default Value
5
No*
rewrite_subject string Description
(rewrite_header subject)
Help Entry
You can choose to have SpamAssassin alter the subject line of messages it identifies as spam. This can make messages tagged as spam more readily visible when viewing a list of messages, and can be used to filter messages based on the subject line in some e-mail clients.
Example Values
no
Example Default Value
no
No*
report_safe integer Description
(report_safe)
Help Entry
In this section, you can set whether and how SpamAssassin alters the messages it tags as Spam.
Example Values
0, 1, 2
Example Default Value
1
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: editAdvanced
Added in version 4.7.0-339
Description Edit advanced spamassassin configuration options.
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: listGlobalPreferences
Added in version 4.8.0-393
Description Lists information about global spam preferences.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’id’ => ’2’,
’username’ => ’@GLOBAL’,
’preference’ => ’use_auto_whitelist’,
’value’ => ’1’,
’type’ => ’global’,
),
1 =>
array (
’id’ => ’4’,
’username’ => ’@GLOBAL’,
’preference’ => ’use_bayes’,
’value’ => ’1’,
’type’ => ’global’,
),
2 =>
array (
’id’ => ’5’,
’username’ => ’@GLOBAL’,
’preference’ => ’bayes_auto_learn’,
’value’ => ’1’,
’type’ => ’global’,
),
),
)
Action: listPreferences
Added in version 4.8.0-393
Description Lists information about current spam preferences.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’id’ => ’172’,
’username’ => ’@~example.com’,
’preference’ => ’add_header’,
’value’ => ’test’,
’type’ => ’domain’,
),
),
)
Action: listSpamPreferenceIds
Added in version 4.7.0-339
Description List e-mail spam preferences by id.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
0 => ’172’,
1 => ’add_header’,
),
),
)
Action: queryEdit
Added in version 5.1.0-838
Description Displays the information available to the action "edit".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’enable_spam’ => ’0’,
’dropscore’ => ’no’,
’spamscore’ => ’5’,
’rewrite_subject’ => ’no’,
’report_safe’ => ’1’,
),
)
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’ => ’172’,
),
)
 Chapter 74: Controller: /siteworx/email/remotesetup Up Part III: SiteWorx API Spec Chapter 76: Controller: /siteworx/email/spf 

(C) 2017 by InterWorx LLC