Controller: EmailSpamprefs

API Controller /siteworx/email/spamprefs
Required Permissions ["EMAIL"]
Action Description
addAdvanced Add advanced spamassassin configuration options.
deleteAdvanced Delete advanced spamassassin configuration options.
edit Edit spamassassin configuration settings.
editAdvanced Edit advanced spamassassin configuration options.
listGlobalPreferences Lists information about global spam preferences.
listPreferences Lists information about current spam preferences.
listSpamPreferenceIds List e-mail spam preferences by id.

Action: addAdvanced

Add advanced spamassassin configuration options.

Input Parameters

Name Type Notes Required?
username string
Example Values
@~example.com
Example Default Value
@~example.com
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_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, ...
Yes
value string Yes
* indicates that it's actually required, but probably already has a valid default value

Action: deleteAdvanced

Delete advanced spamassassin configuration options.

Input Parameters

Name Type Notes Required?
pref_id struct (integer) Yes

Action: edit

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:

1. Deliver the Spam to an IMAP mailbox named "Spam" or if that box does not exist, the "Inbox".

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

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)

Lists information about global spam preferences.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'id' => '4',
      'username' => '@GLOBAL',
      'preference' => 'add_header',
      'value' => 'test',
      'type' => 'global',
    ),
  ),
)

Action: listPreferences (Added in version 4.8.0-393)

Lists information about current spam preferences.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'id' => '111',
      'username' => '@~example.com',
      'preference' => 'add_header',
      'value' => 'test',
      'type' => 'domain',
    ),
  ),
)

Action: listSpamPreferenceIds

List e-mail spam preferences by id.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      0 => '111',
      1 => 'add_header',
    ),
  ),
)