Mango Mail - Affordable & easy-to-use email host with unlimited addresses | Product Hunt
  1. docs
  2. getting started

Filters: What They Are and How to Use Them

last updated May 19, 2024


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

Fileinto Example

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";

Vacation (Out-of-office) Example

This script automatically replies to messages while the owner is on vacation:

require ["vacation", "date", "relational"];

# Auto reply to all emails between June 1st and July 1st.
# ":days 1" limits auto replies to one per day
if allof (currentdate :value "ge" "date" "2024-06-01", currentdate :value "le" "date" "2024-07-01") {
        :days 1
        :subject "Out of office"
        "Hello, I am currently on vacation and will return by July 1st. Please contact John for any urgent matters.";


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.