SpamAssassin Spam Filter

The SpamAssassin spam filter identifies spam messages among emails sent to mailboxes hosted on your Plesk server.

Learn how to switch on and configure the spam protection at the Switching on SpamAssassin section.

To achieve the desired level of spam protection, Plesk lets you configure a number of SpamAssassin settings, namely:

[mail]
spamAssassin.maxChildrenLimit = 80

where the numeric value indicates the maximum number of SpamAssassin processes that can be configured in the Plesk GUI.

Note: Plesk provides only basic SpamAssassin functionality. If you want to create complex antispam rules, edit SpamAssassin configuration files. For more information on advanced SpamAssassin configuration, refer to the Advanced Administration Guide, Spam Protection for Linux or Windows and other respective documentation at http://spamassassin.apache.org/doc/Mail_SpamAssassin_Conf.html.

SPAM_filter_setting

Next in this section:

Switching on SpamAssassin

Defining the Maximum Mail Size for SpamAssassin (Linux)

Configuring Black and White Lists

 

Switching on SpamAssassin

To switch on SpamAssassin:

  1. Go to Tools & Settings > Spam Filter (in the Mail group).
  2. Select the option Switch on server-wide SpamAssassin spam filtering.
  3. To let your users set their own spam filtering preferences on a per-mailbox basis, select the option Apply individual settings to spam filtering.
  4. Specify the maximum number of SpamAssassin processes in the field Maximum number of worker spamd processes to run (1-5). We recommend that you use the default value.
  5. Adjust the spam filter's sensitivity by typing the desired value in the field The number of points a message must score to qualify as spam.

    By default, the filter sensitivity is set so that all messages that score 7 or more points are classified as spam. If your users still receive spam messages with the default sensitivity, increase it by setting a lesser value, for example, 6. If SpamAssassin marks valid messages as spam, decrease the sensitivity by setting a higher value.

  6. On Windows, define the maximum size of messages that SpamAssassin will process by selecting the option Do not filter if mail size exceeds specified size and providing the desired value. On Linux, this parameter is unavailable in Plesk. For details on editing the maximum mail size on Linux, see Defining the Maximum Mail Size for SpamAssassin (Linux).
  7. Specify how to mark messages recognized as spam in the field Add the following text to the beginning of subject of each message recognized as spam. If you do not want the spam filter to modify message subject, leave this box blank. If you want to include into the subject line the number of points that messages score, type _SCORE_ in this box.
  8. On Windows, specify trusted languages and locales using the lists Trusted languages and Trusted locales.
  9. Click OK.

 

Defining the Maximum Mail Size for SpamAssassin (Linux)

To decrease the load on your server caused by SpamAssassin, you can limit the maximum size of emails that SpamAssassin should analyze. All messages exceeding this size will be delivered to their recipients without checking.

To define the maximum size of messages that SpamAssassin will process:

  1. Open for editing the configuration file /etc/psa/psa.conf
  2. Specify the desired value in bytes for the parameter SA_MAX_MAIL_SIZE.

    By default, the maximum email size is 256000 bytes. We recommend that you limit the maximum mail size to 150 - 250 Kbytes, which is usual for mail messages in HTML format with images. The size of the mail is considered critical for filter and server overload if it exceeds 500 Kbytes, which is usual for mail messages containing attachments.

 

Configuring Black and White Lists

To add entries to the black or white list:

  1. Go to the Black List or the White List tab of the Tools & Settings > Spam Filter page.
  2. Click Add Addresses.
  3. Provide the list of entries you want to add to the list.

    Separate addresses with a comma, a colon, or a white space. You can use an asterisk (*) as a substitute for a number of letters, and question mark (?) as a substitute for a single letter. For example: address@spammers.net, user?@spammers.net, *@spammers.net. Specifying *@spammers.net will block the entire mail domain spammers.net. If you use a Windows-based server, also specify what to do with messages coming from the specified addresses.

  4. Click OK.

To remove entries from the black or white list:

Select the entries on the corresponding tab and click Remove.