Articles in this section

How to configure spam score and spam action for all mailboxes in Plesk for Linux

kb: how-to Plesk for Linux ABT: Group A

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

  1. Log in to Plesk.

  2. Install Plesk Email Security extension from Plesk Extensions Catalog. It will appear in Plesk > Tools & Settings > Plesk Email Security (under Mail).

  3. Open the extension to complete the installation. 

  4. Once the installation is complete, switch to the Server Settings tab and adjust spam action according to your needs:




  5. 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.

 

For existing mailboxes

 

  1. Connect to your Plesk server via SSH.

  2. Install SpamAssassin using Plesk Installer:

    # plesk installer add --components spamassassin

  3. Download the script:

    # curl -OL https://raw.githubusercontent.com/plesk/kb-scripts/master/move-mail-to-spam/existing-mailboxes.sh

  4. Grant execution permission to the script:

    # chmod +x existing-mailboxes.sh

  5. Run the script:

    # ./existing-mailboxes.sh

 

For newly created mailboxes

 

  1. Connect to your Plesk server via SSH.

  2. Install SpamAssassin using Plesk Installer:

    # plesk installer add --components spamassassin

  3. Download the script:

    # curl -OL https://raw.githubusercontent.com/plesk/kb-scripts/master/move-mail-to-spam/new-mailboxes.sh

  4. Grant execution permission to the script:

    # chmod +x new-mailboxes.sh

  5. Go to Plesk > Tools & Settings > Event Manager.

  6. Click Add Event Handler.

  7. Select the event Mail account created and specify the path to the script in the Command field:

    CONFIG_TEXT: /root/new-mailboxes.sh

 

Was this article helpful?

Comments

2 comments
Date Votes
  • Do we also need to do if plesk email security extension is installed?

    0
  • 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.

    Spamassassin server wide status is off. Skipping user settings updating
    Spamassassin server wide status is off. Skipping user settings updating
    Spamassassin server wide status is off. Skipping user settings updating
    0

Please sign in to leave a comment.