Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

New Kolab Release 2: Plesk Premium Email Anti-spam Integration

  • By Elvis Plesky
  • March 13, 2019
  • Partners, Plesk news and announcements, Product and technology
2
Minutes

Using the Plesk Premium Email extension, your users’ ability to make the system learn about spam and ham greatly improves. This article outlines the functionality of the anti-spam integration of Plesk Premium Email using Dovecot, SpamAssassin and its Bayes algorithms.

A Plesk installation normally uses Dovecot, Postfix, SpamAssassin and Roundcube to provide your users with a complete mail stack. There are regular tests shipped with SpamAssassin. And of course, they detect spam and mark it as such – or even move the spam out of the user’s inbox.

But what happens when it can’t detect the spam? What if we incorrectly identify the mail as spam? How do your users let the system know what’s what?

How Plesk Premium Email anti-spam integration works

Users usually recognize a message as spam, press “Mark as Junk” or “Trash” buttons, and remove it from their inbox. Naturally, we want to prevent similar messages from cluttering inboxes again and again. Therefore, we could learn from the messages marked as spam or ham.

Can we learn from users’ interactions?

Yes! Because Plesk Premium Email creates the necessary feedback loop. Dovecot works in such a way that when a mail is moved in to or out of the Spam folder, the system learns whether the message is spam or ham. If you want to learn more about this, check the low-level technology documentation here.

Here’s the main outline of anti-spam integration

When a user recognizes a message as Spam, they press the “Mark as Junk” button. This can happen in Thunderbird, Roundcube, or anywhere else for that matter. Effectively, the message is moved from whichever folder it was, into the Spam folder.

When this change happens, Dovecot gets a trigger to respond by executing a system-wide Sieve script. This Sieve script in turn pipes the message through the SpamAssassin sa-learn utility. The same applies in the opposite scenario – if a user recognizes a message in the Spam folder as not actually spam. Because moving the message out of the spam folder will also ultimately trigger sa-learn.

Anti-spam integration: Installation instructions

We implemented this functionality in the Plesk Premium Email extension for v. 16.6 and up. But the extension itself can’t install the SpamAssassin component. You need manual intervention from a Plesk system administrator.

See Anti-Spam in Plesk Premium Email

Either ensure you install the SpamAssassin component before updating the extension. Or else, update the extension, then install the SpamAssassin component. Next, execute the following command-line. Because it will reconfigure domains and mailboxes with the Plesk Premium Email permission:

# /usr/local/psa/admin/bin/php \
-dauto_prepend_file=sdk.php \
'/usr/local/psa/admin/plib/modules/kolab/scripts/spamassassin.php'

Installing or removing SpamAssassin Component using Command Line

# /usr/local/psa/admin/sbin/autoinstaller add --components spamassassin

To remove SpamAssassin, albeit not recommended;

# /usr/local/psa/admin/sbin/autoinstaller remove --components spamassassin

Follow it up with disabling integration in the Plesk Premium Email extension;

# /usr/local/psa/admin/bin/php \
-dauto_prepend_file=sdk.php \
'/usr/local/psa/admin/plib/modules/kolab/scripts/spamassassin.php'

For more information about this integration, read our full documentation here.

What do you think of Kolab’s Anti-Spam integration using SpamAssassin and Dovecot? Let us know below.

arrow icon - Plesk
Tweet
Share
Share
Email
0 Shares
Picture of Elvis Plesky

Elvis Plesky

Our fun and curious team mascot's always plugged into the latest trends. He's here to share his knowledge and help you solve your tech problems.

One comment

  1. Peter
    Peter
    Apr 29, 2019 / 2:10 pm # Link Reply

    Spamassassin itself moves spam, that was already recognized as such, to the Spam folder. That is for the user to be able to check, whether there was a false positive. Does Kolab learn these messages, already tagged as Spam, again? That would confuse and fragment every bayes db out there.

Add a CommentCancel Reply

Your email address will not be published. Required fields are marked *

More results...

Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt

GET LATEST NEWS AND TIPS

  • Yes, please, I agree to receiving my personal Plesk Newsletter! WebPros International GmbH and other WebPros group companies may store and process the data I provide for the purpose of delivering the newsletter according to the WebPros Privacy Policy. In order to tailor its offerings to me, Plesk may further use additional information like usage and behavior data (Profiling). I can unsubscribe from the newsletter at any time by sending an email to [email protected] or use the unsubscribe link in any of the newsletters.

  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form

Related Posts

Get Your Hands on Plesk Extensions and Toolkits This ‘HoliDeals’ Season (Part 1)

Read More »

How Modern Secure and Self-Hosted Messaging has Become a Cornerstone for Teams Worldwide

Read More »

Key Reasons Why You Should Upgrade Your Email Security Today

Read More »

Knowledge Base

SpamAssassin Spam Filter – (Plesk for Linux) Defining the Maximum Mail Size for SpamAssassin

Read More »

SpamAssassin Spam Filter – Configuring Black and White Lists

Read More »

Available Licensing Models

Read More »

Watchdog (System Monitoring) Component

Read More »

Restoring Mail Configuration

Read More »
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family