Get Spam Out of Your INBOX
Knowledge Base > Documentation > Get Spam Out of Your INBOX
By Jeroen van Meeuwen on October 16, 2017

Kolab Now doesn’t filter spam out of your INBOX aggressively — it is really up to the customer to decide what to do with spam, and how to treat spam. It isĀ discretionary. This article outlines how you could treat spam, in the form of a few suggestions.

Discard Definite Spam Messages

This little routine uses the X-Spam-Flag header, that is either non-existent (definitely not spam), or is set to YES, or NO.

Go to “Settings” -> “Filters”. Create a new filter called “Spam Block”. Note you should not need to create a new “Filter Set”, but you should have at least one “Filter Set” enabled.

Under “For incoming mail”, fill out the form as illustrated in the image on your right-hand side.

To discard the message(s), use “Delete message” under “… execute the following actions:”


Deliver Some Spam to the Spam Folder

This filter uses the X-Spam-Level header, that either does not exist (definitely not spam) or is a number of asterisks (*) indicating the score of the mail message.

Go to “Settings” -> “Filters”, if you are not there already. Create a new filter called “Spam to Spam”.

Under “For incoming mail”, fill out the form as illustrated in the image on your right-hand side. Note that in the example, I use 3 consecutive asterisks, basically indicating I want everything with a score of 3 or higher to be delivered to my Junk folder.

Bring it all together

Adding more options to the same filter rule can give a better overview. This following rule should cover most of the tagged spam:

If you are editing your filter directly in the script, or through a client like e.g. Thunderbird, the rule can look like this:

# rule:[Most Spam]
if anyof (header :contains "subject" "***SPAM***", header :contains "x-spam-flag" "YES", header :contains "x-spam-level" "***")
fileinto "Spam";

Note: Add the Stop evaluating rules ( or stop;) to the end of the rule when you have more rules nested in the same rule (as in the example).

Also Note: Sieve is case sensitive. Typing e.g. x-spam-level will make the rule fail. You need to type X-Spam-Level (as in the example).


Tags: Tags: , ,