Applicable to:
- Plesk for Linux
Question
How to configure spam score and spam action for all mailboxes?
Ho to configure all mailboxes to move spam messages to a Spam folder automatically.
Answer
-
Install Plesk Email Security extension from Plesk Extensions Catalog. It will appear in Plesk > Tools & Settings > Plesk Email Security (under Mail).
-
Open the extension to complete the installation.
-
Once the installation is complete, switch to the Server Settings tab and adjust spam action according to your needs:
-
Save the changes.
Note: To apply the new settings to all existing mailboxes, on the Server Settings tab expand Advanced and click Reset under Reset spam policy.
To change the spam action for all mailboxes without Plesk Email Security, follow the steps below to run the script that will configure all mailboxes to move spam messages to a Spam folder automatically.
-
Connect to your Plesk server via SSH.
-
Install SpamAssassin using Plesk Installer:
# plesk installer add --components spamassassin
-
Download the script:
# curl -OL https://raw.githubusercontent.com/plesk/kb-scripts/master/move-mail-to-spam/existing-mailboxes.sh
-
Grant execution permission to the script:
# chmod +x existing-mailboxes.sh
-
Run the script:
# ./existing-mailboxes.sh
-
Connect to your Plesk server via SSH.
-
Install SpamAssassin using Plesk Installer:
# plesk installer add --components spamassassin
-
Download the script:
# curl -OL https://raw.githubusercontent.com/plesk/kb-scripts/master/move-mail-to-spam/new-mailboxes.sh
-
Grant execution permission to the script:
# chmod +x new-mailboxes.sh
-
Go to Plesk > Tools & Settings > Event Manager.
-
Click Add Event Handler.
-
Select the event Mail account created and specify the path to the script in the Command field:
CONFIG_TEXT: /root/new-mailboxes.sh
Comments
2 comments
Do we also need to do if plesk email security extension is installed?
it doesn't make it clear if it is applicable only to Plesk or Plesk email security extensions.
I've Plesk email security extension installed with a license and I tried to run it, I received the below output from the script for existing mailboxes.
Please sign in to leave a comment.