Applicable to:
- Plesk for Linux
Question
How to configure mailboxes to move spam messages to a Spam folder server-wide in Plesk?
Answer
It is not possible to configure mailboxes to move spam messages to a Spam folder server-wide in Plesk via GUI. It can be configured individually for a mailbox.
Please follow the below steps to configure the Spam folder server-wide using CLI utility for Spamassassin:
-
Install Spamassassin in Plesk > Tools & Settings > Updates & Upgrades
-
Log in to Plesk server using SSH
-
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
-
Execute the script:
# ./existing-mailboxes.sh
-
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.