Applicable to:
- Plesk Onyx for Linux
Question
How to manage spam messages (Linux)?
How to configure SpamAssassin?
Answer
In order to manage spam messages, SpamAssassin can be used:
-
Install SpamAssassin on the server.
-
Configure SpamAssasin:
-
Go to Plesk > Tools & Settings > Spam Filter.
-
Configure settings:
-
Switch on server-wide SpamAssassin spam filtering
Turn on the protection against spam on a server-wide level.
-
Switch on server-wide greylisting spam protection
Turn on greylisting.
Greylisting is a spam protection system which works as follows:
For every email message that comes to the server, sender's and receiver's email addresses are recorded in a database. When a message comes for the first time, its sender and receiver addresses are not listed in the database yet, and the server temporarily rejects the message with an SMTP error code. If the mail is legitimate and the sending server is properly configured, it will try sending email again and the message will be accepted. If the message is sent by a spammer, then mail sending will not be retried: spammers usually send mail in bulk to thousands of recipients and do not bother with resending.
-
Apply individual settings to spam filtering
Asllow users set their own spam filtering preferences on a per-mailbox basis.
-
The maximum number of worker spamd processes to run
Set the maximum number of worker spamd processes to run (1-5). We recommend that you use the default value.
-
The score that a message must receive 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 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, e.g. 8.
-
Add the following text to the beginning of subject of each message recognized as spam
Specify how to mark messages recognized as spam. If it is not required to modify messages subject, leave this box blank. If it is required to include into the subject line the number of points that messages score, type _SCORE_ in this box:
-
-
Press the OK button.
-
If the Apply individual settings to spam filtering option was enabled on step 3, custom SpamAssassin settings can be set for each mailbox:
-
Go to Plesk > Domains > example.com > Email Addresses > john.doe@example.com > Spam Filter.
-
Configure SpamAssassin settings for this mailbox:
Note: Click the Hide Advanced Settings button to see all avaliable settings
-
Switch on spam filtering for this email address
Turn on using the SpamAssassin on this mailbox.
-
What to do with messages classified as spam
Allow to select one of three avaliable options:
-
Mark spam messages by adding the following text to message subject
If it is not required to modify messages subject, leave this box blank. If it is required to include into the subject line the number of points that messages score, type _SCORE_ in this box.
-
Delete all spam messages
Spam messages will be deleted from the mailbox.
-
Move spam to the Spam folder
Move all spam messages to the folder called
Spam
. This folder is accessible from your mail client program or webmail. If an IMAP mail account is used, theSpam
folder can be used for training the spam filter.
-
-
Spam filter sensitivity
By default, the filter sensitivity is set so that all messages that score 7 or more points are classified as spam. If 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, e.g. 8.
-
White List
Email messages coming from senders in the white list are not checked by the spam filter.
-
Black List
Email messages coming from senders in the black list are blocked.
-
-
Press the OK button.
-
Comments
4 comments
I don't even have Spam Filter in Domains > example.com > Email Addresses > info@example.com
Hello @Kironet, could you specify, do you have SpamAssassin installed?
What version of Plesk and OS do you use?
How to set "Move to SPAM folder" as default option for all inbox/domains?
this option is only shown in per-inbox "Spam Filter" Tab
Hello @Francesco.
This functionality is yet to be implemented in Plesk. Please refer to this article for the workaround.
Please sign in to leave a comment.