How do I filter my email?

This wiki page explains how to create email filters.

Email filtering allows you to automatically move messages that match a certain description into a different folder.

For example, you can move all messages from a particular email list into a folder so you can read them when you have time and they don't clutter your inbox.

May First/People Link will automatically move messages that we suspect are spam into your Spam folder. You do not need to define a filter to do this. In addition, if you set a filter by followin these directions, that filter will work regardless of whether you check your email on your phone, computer or via webmail (these features are new starting in July 2015).

Easy method

The easiet method to create a filter is to login to our web mail client here: Remember, the filters will work even if you check your email using a different program.

Once you have logged in, click the Settings link in the top right corner:

Next, click the Filter link on the left hand side to see your filters:

Last, add a new rule to your default filter by clicking the plus (+) sign in the lower left hand side of the filters box:

By Hand

By writing your own sieve scripts you can have a lot more control over what happens and program actions that are not available via the Roundcube plugin. Writing your own script requires advanced knowledge, including the ability to either use Secure FTP or ssh.

A sieve script is simply a text file that is saved in the .sieve directory in your home directory. The file can have any name or extension you like, however, the convention is to use the .sieve extension for each file. You can have many scripts in your .sieve directory, but only one can be active at a given time. To make a script active, create a symlink in your home directory called .dovecot.sieve that points to the file in your .sieve directory that you want to be active.

For background info on the sieve language, including a simple example file, checkout the Wikipedia Page on Sieve. There is a good collection of resources on the sieve web site as well.

For tutorials, there is one available from and another available via

And for a complete reference, see thsmi's site.

Lastly, if you are running linux on your desktop client, you can install the sieve-connect program which will help you upload your sieve scripts and make them active without requiring sftp/ssh access. There are a more sieve clients you can check out that run on a variety of platforms, however, your mileage may vary.

A few notes on filing messages:

  • When you want to file a message into your inbox, the action should be:
    fileinto "INBOX";
  • If you want to file into your Spam box, it should be:
    fileinto "INBOX.Spam";

If you want to check a log, look in ~/.dovecot.sieve.log.

Last modified 6 years ago Last modified on Jan 8, 2016, 9:04:04 AM

Attachments (3)

Download all attachments as: .zip