spamassassin.exe: Spam Filtering Configuration on the Mailbox Level
The spamassassin.exe
utility serves to manage spam filtering on the mail-account level. The utility allows the following operations:
- enabling the use of server-wide spam filtering settings
- setting the number of hits required to mark a letter as spam
- adding mail addresses to black and white lists
- marking mail subject as spam, deleting spam messages
Location
%plesk_cli%
Usage
spamassassin.exe <command> [<email>] [
<option 1> <param 1>[,<param 2>,...,<param n>]
[<option 2> <param 1>[,<param 2>,...,<param n>]]
... [<option N> <param 1>[,<param 2>,...,<param n>]]
]
Example
The following command modifies the SpamAssassin configuration on JohnDoe@example.com to using server-wide settings, sets the number of hits sufficient to consider a letter as spam to 6, orders to delete spam, and puts the spam@sample.com email address to the black list.
spamassassin.exe --update JohnDoe@example.com -server-conf true -hits 6 -action del -blacklist add:spam@sample.com
Commands
Command | Parameter | Description | Example |
---|---|---|---|
|
|
Updates the spam filter configuration for an existing email account. |
Updates spam filter settings for John@example.com: spamassassin.exe --update John@example.com -hits 3 -action del -blacklist add:spam@sample.com or spamassassin.exe -u John@example.com -hits 3 -action del -blacklist add:spam@sample.com |
|
|
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.exe --update-server -hits 5 |
|
|
Displays the Spamassassin spam filter settings of the Plesk server. |
To view the Spamassassin spam filter settings for the Plesk server: spamassassin.exe --info-server |
|
|
Retrieves the spam filter settings for the specified mail account. |
To retrieve spam filter settings for JohnDoe@example.com: spamassassin.exe --info JohnDoe@example.com or spamassassin.exe -i JohnDoe@example.com |
|
|
Displays help on the use of this utility. |
To see the help info on the use of the spamassassin.exe --help or spamassassin.exe -h |
Options
Option | Parameter | Description | Example | |
---|---|---|---|---|
|
|
Enables/Disables the Spamassassin service settings. |
To enable the Spamassassin filter on the mail account JDoe@example.com: spamassassin.exe -u JDoe@example.com -status true To disable the Spamassassin filter on the Plesk server: spamassassin.exe --update-server -status false |
|
|
|
Deprecated. Use |
|
|
|
|
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.exe -u JDoe@example.com -personal-conf true |
|
|
|
Specifies the number of hits that are enough to consider a letter as spam. |
To set the number of hits required to mark a letter as spam for the JohnDoe@example.com to 3: spamassassin.exe --update JohnDoe@example.com -hits 3 |
|
|
|
Specifies e-mail message size. All messages that exceed the specified size are not processed by spam filter. |
To set the spam filter for JohnDoe@example.com to skip messages larger than 5 megabytes: spamassassin.exe --update JohnDoe@example.com -max-mail-size 5M |
|
|
|
Specifies how to deal with e-mail messages that are considered as spam:
|
To enable deleting spam messages automatically for JDoe@example.com: spamassassin.exe --update JDoe@example.com -action del |
|
|
|
Specifies the maximum number of simultaneously running Note: Some versions on SpamAssassin do not support this option. |
To set the maximum number of simultaneously running spamassassin.exe --update-server -max-proc 4 |
|
|
|
Enables/Disables deleting spam messages automatically. |
To enable deleting spam messages automatically for JDoe@example.com: spamassassin.exe --update JDoe@example.com -reject-spam true |
|
|
|
Specifies the spam detection alert text. |
To specify the spam detection alert text for JDoe@example.com: spamassassin.exe --update JDoe@example.com |
|
|
|
Allows/Prohibits modifying the subject of mail messages. |
To allow mail subject modification and to mark the subject with the word "SPAM" for JohnDoe@example.com: spamassassin.exe --update JohnDoe@example.com -modify-subj true -modify-subj-text "SPAM" |
|
|
|
Modifies the text of email message’s subject. |
||
|
|
Configures patterns for the black list. |
To add spam@sample.com to the black list of JohnDoe@example.com: spamassassin.exe --update JohnDoe@example.com -blacklist add:spam@sample.com,spam@example.com |
|
|
|
Configures patterns for the white list. |
To delete Jane@sample.com from the white list: spamassassin.exe --update JohnDoe@example.com -whitelist del:Jane@sample.com |
|
|
|
Deprecated. Use |
|
|
|
|
Configures list of allowed languages. The parameter must be a valid language code described in ISO-639-2. |
To add Chinese to trusted languages of Jane@sample.com : spamassassin.exe --update Jane@example.com --trusted-languages zh |
|
|
|
Configures list of allowed locales. Allowed values: en - Western character sets in general ja - Japanese character sets ko - Korean character sets ru - Cyrillic character sets th - Thai character sets zh - Chinese (both simplified and traditional) character sets |
To add Cyrillic to trusted locales of Jane@sample.com : spamassassin.exe --update Jane@example.com --trusted-locales ru |
|
|
|
Configures list of allowed locales. Allowed values: en - Western character sets in general ja - Japanese character sets ko - Korean character sets ru - Cyrillic character sets th - Thai character sets zh - Chinese (both simplified and traditional) character sets |
To add Cyrillic to trusted locales of Jane@sample.com : spamassassin.exe --update Jane@example.com --trusted-locales ru |
|
|
|
Configures list of allowed IP addresses. Use this option only with the |
To add the 192.0.2.0 - 192.0.2.255 address range to trusted IPs of Jane@sample.com : spamassassin.exe --update Jane@example.com --trusted-networks 192.0.2/24 |