1. docs
  2. getting started

Filters: What They Are and How to Use Them

last updated January 4, 2024

Introduction

Sometimes the most common email setups aren't the best fit. Maybe you need to filter mail based on who sent it, or maybe you need to tag messages with a certain subject line. How could you go about this without needing to create some sort of solution on every client device? This is where Filters come into play.

What are Filters?

Filters are Sieve scripts which can be created and activated straight from the Mango Dashboard. They allow you to leverage the Sieve language and its many extensions to perform custom actions on incoming mail. This means you can build scripts to do all sorts of tasks before messages arrive in your mailbox.

How is this different from making a filter on my client?

Mango Mail's filters are known as "server-side" filters. This means that the filtering is done on our end instead of on your device. The benefit is that you only need to set up the filter once, then all your connected devices will read the mail after the filtering has been done on the server. In addition to this, Mango Mail filters open up more functionality than regular filters. Not only can you automatically filter mail into different folders, but you can achieve more advanced workflows such as automatic replies.

Which plans support custom filters?

Custom filters are only available to Small Business and higher plans.

How do I create a filter?

  1. Log into the Mango Dashboard and click on the "Filters" tab.
  2. Click "new filter".
  3. Enter a name for your filter and write your sieve script.
  4. Click "Save filter".
  5. Go to the address you would like to assign the filter.
  6. Enter the name of the filter you created under the "Active Filter" section.
  7. Finally, click "Save changes" to finish enabling the script on your address.
You can assign the same filter to many addresses. However, you can only activate one script for each address. It is also important to note that you can only apply filters on real mailboxes (not aliases).

Here's an example script which moves messages to the trash if the subject line contain "test":

require ["fileinto"];

# Move emails with 'test' in the subject to trash
if header :contains "subject" "test" {
    fileinto "Trash";
}

Conclusion

With the ability to create custom filters, you can now build the email flow of your dreams! That may sound like an exaggeration, but the power of filters are unimaginable until you actually use them.