📄️ Overview
The spam filter is enabled by default in Stalwart Mail Server, providing a robust defense against unwanted emails. However, administrators can disable it globally by setting the spam-filter.enable setting to false. Alternatively, it can be disabled dynamically using an expression at the SMTP DATA stage. Additionally, spam filtering can be disabled for specific users by removing the spam-filter-classify permission from their user account or the tenant they belong to.
📄️ Scores
As mentioned in the tags and scores section, the spam filter's analysis of incoming messages yields a series of tags, each with a corresponding score. To determine the email's overall classification (spam or ham), scores associated with these tags play a crucial role.
📄️ Database
The spam filter relies on the default in-memory store in order to maintain and manage various crucial pieces of information. The information stored in the in-memory store is essential for the spam filter to function effectively and make informed decisions on incoming emails. Some of the key data stored in this store includes:
📄️ MIME Types
Filename extensions along with their expected mime types and associated defined are listed in the spam-filter.list.file-extensions setting. These flags provide the spam filter with guidelines on how to handle emails containing files with these extensions, allowing for a more informed and precise classification of potentially malicious emails.
📄️ Domain Lists
Some of the lists stored as lookup lists provide the spam filter with guidelines on handling emails from or containing specific domains. These lists contain one domain per line and are used to categorize domains based on their characteristics and help streamline the email filtering process. Let's delve into the details of each list: