The spamassassin utility is used to manage the Spamassassin spam filter through CLI. By using this utility, you can perform the following tasks:
Usage
spamassassin <command> [<mail_name>] [
<option_1> [<param>]
[<option_2> [<param>]]
… [<option_N> [<param>]]
]
Example
The following command enables Spamassassin filter on the mail account JDoe@example.com, enables the use of mail name-specific Spamassassin filter settings, sets the minimum score for marking email messages as spam to 3 and enables deleting spam messages automatically from the mailbox:
# ./spamassassin --update JDoe@example.com -status true -personal-conf true -reject-spam true -hits 3
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Updates the Spamassassin spam filter settings on a Plesk mail account. |
To set the minimum score for marking email messages as spam and deleting them automatically for JDoe@example.com to 3: # ./spamassassin --update JDoe@example.com -hits 3 -reject-spam true or # ./spamassassin -u JDoe@example.com -hits 3 -reject-spam true |
|
|
Updates the Spamassassin spam filter settings on the Plesk server. |
To set the minimum score for marking email messages as spam for the Plesk server to 5: # ./spamassassin --update-server -hits 5 |
|
|
Displays the Spamassassin spam filter settings of a Plesk mail account. |
To view the Spamassassin spam filter settings of JDoe@example.com: # ./spamassassin --info JDoe@example.com or # ./spamassassin -i JDoe@example.com |
|
|
Displays the Spamassassin spam filter settings of the Plesk server. |
To view the Spamassassin spam filter settings for the Plesk server: # ./spamassassin --info-server |
|
|
Displays help on the use of this utility. |
To view the help info on the use of the spamassassin utility: # ./spamassassin --help |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Enables/Disables the Spamassassin filter. |
To enable the Spamassassin filter on the mail account JDoe@example.com: # ./spamassassin -u JDoe@example.com -status true To disable the Spamassassin filter on the Plesk server: ./spamassassin --update-server -status false |
|
|
Enables/Disables using server- wide antispam filter settings. Deprecated since Plesk 8.1. |
To enable using server-wide Spamassassin filter settings: # ./spamassassin --update-server -server-conf true |
|
|
Enables/Disables using mail name-specific (rather than server- wide) antispam filter settings for a mail account. |
To enable using mail name-specific Spamassassin filter settings on JDoe@example.com: # ./spamassassin -u JDoe@example.com -personal-conf true |
|
|
Specifies the minimum score for a mail message to be marked as spam. |
To set the minimum score for marking mail messages as spam for JDoe@example.com to 3: # ./spamassassin --update JDoe@example.com -hits 3 |
|
|
Specifies the maximum number of simultaneously running |
To set the maximum number of simultaneously running # ./spamassassin --update-server -max-proc 4 |
|
|
Enables/Disables subject lines automatic modification for messages marked as spam. |
To enable subject lines automatic modification for spam messages and to specify the text to be inserted in the beginning of the subject line to "***SPAM*** Score: # ./spamassassin -u JDoe@example.com -modify-subj true -modify-subj-text "***SPAM*** Score: _SCORE_ :" |
|
|
Specifies the text to be inserted in the beginning of a subject line for messages marked as spam. Type |
|
|
|
Enables/Disables deleting spam messages automatically. |
To enable deleting spam messages automatically for JDoe@example.com: # ./spamassassin --update JDoe@example.com -reject-spam true |
|
|
Add/Deletes mail patterns to/from ignore list. Used with Deprecated since Plesk 8.1. |
To add email patterns jane*@example.com and ???Doe@*.example.net to the Spamassassin's black list of JDoe@example.com: # ./spamassassin --update JDoe@example.com -ignorelist add:jane*@example.com,???user@*.example.net |
|
|
Adds/Deletes mail patterns to/from the Spamassassin black list; enables/disables email patterns in the Spamassassin black list.
The |
To add e-mail patterns *jane@example.com and ???Doe@*.example.net to the Spamassassin's black list for JDoe@example.com: # ./spamassassin --update JDoe@example.com -blacklist add:*jane@example.com,???user@*.example.net |
|
|
Adds email patterns to or deletes them from the Spamassassin white list. Enables or disables email patterns in the Spamassassin white list. The |
To add e-mail patterns *jane@example.com to the Spamassassin's white list of the server: # ./spamassassin --update-server -whitelist add:*jane@example.com |
* Non-ASCII characters are not allowed on the left of the @ sign in the e-mail pattern. E-mail patterns can include the "*" and "?" wildcard characters (for example, *@domain.com, user?@*.com). Non-ASCII parts of domain names must not contain wildcard characters.