The spamassassin utility is used to manage the Spamassassin spam filter through CLI. By using this utility, you can perform the following tasks:
Syntax
spamassassin <command> [<mail name>] [
<option_1> [<param>]
[<option_2> [<param>]]
…[<option_N> [<param>]]
]
Example
The following command line enables Spamassassin filter on mail name admin@example.com, enable the use of mail name-specific Spamassassin filter settings, set the minimum score of 3 for marking e-mail messages as spam and enables deleting spam messages automatically from the mail box:
# ./spamassassin --update admin@example.com -status true -personal-conf true -reject-spam true -hits 3
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Updates the Spamassassin spam filter settings for a Plesk mail name. |
To set the minimum score of 3 for marking e-mail messages as spam and deleting them automatically for Plesk mail name admin@example.com: # ./spamassassin --update admin@example.com -hits 3 -reject-spam true or # ./spamassassin -u admin@example.com -hits 3 -reject-spam true |
|
|
Updates the Spamassassin spam filter settings for the Plesk server. |
To set the minimum score of 5 for marking e-mail messages as spam as the default Plesk server setting: # ./spamassassin --update-server -hits 5 |
|
|
Displays the Spamassassin spam filter settings for a Plesk mail name. |
To display the Spamassassin spam filter settings for admin@example.com: # ./spamassassin --info admin@example.com or # ./spamassassin -i admin@example.com |
|
|
Displays the Spamassassin spam filter settings for the Plesk server. |
To display the Spamassassin spam filter settings for the Plesk server: # ./spamassassin --info |
|
|
Displays help on the use of this utility. |
To see the help info on the use of the spamassassin utility: # ./spamassassin -–help |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Enables or disable the Spamassassin filter for a Plesk mail name. |
To enable the Spamassassin filter for mail name admin@example.com: # ./spamassassin -u admin@example.com -status true |
|
|
Enables or disables the use of mail name-specific (rather than server- wide) antispam filter settings for a mail name. |
To enable the use of mail name-specific Spamassassin filter settings for mail name admin@example.com: # ./spamassassin -u admin@example.com -personal-conf true |
|
|
Specifies the minimum score for an e-mail message to be marked as spam (the The score that a message must receive to qualify as spam parameter). |
To set the minimum score of 3 for marking e-mail messages as spam for Plesk mail name admin@example.com: # ./spamassassin --update admin@example.com -hits 3 |
|
|
The maximum number of simultaneously running |
To set the maximum number of simultaneously running spamd processes on server to 4: # ./spamassassin --update-server -max-proc 4 |
|
|
Enables or disables automatic modification of subject lines of messages marked as spam. |
To enable automatic modification of subject lines of messages marked as spam and to specify the text to be inserted in the beginning of a subject line of each spam message as " # ./spamassassin -u admin@example.com -modify-subj true -modify-subj-text "***SPAM*** Score: _SCORE_ :" |
|
|
Specifies the text to be inserted in the beginning of a subject line of every message marked as spam. Type |
|
|
|
Enables or disables deleting spam messages automatically (the Delete spam mail when it comes to mailbox parameter): |
To enable deleting spam messages automatically: # ./spamassassin --update admin@example.com -reject-spam true |
|
|
Adds e-mail patterns to or deletes them from the Spamassassin's Black list. Enables or disables e-mail patterns in the Spamassassin's Black list. The |
To add e-mail patterns *jane@example.com and ???user@*.example.net to the Spamassassin's black list: # ./spamassassin --update admin@example.com -blacklist add:*jane@example.com,???user@*.example.net |
|
|
Adds e-mail patterns to or deletes them from the Spamassassin's White list. Enables or disables e-mail patterns in the Spamassassin's White list. The |
To add e-mail patterns *jane@example.com and ???user@*.example.net to the Spamassassin's white list: # ./spamassassin --update admin@example.com -blacklist add:*jane@example.com,???user@*.example.net |
* 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.