[[PageOutline]] = Email Filtering = 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: https://roundcube.mayfirst.org/. 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: [[Image(roundcube-settings.png)]] Next, click the Filter link on the left hand side to see your filters: [[Image(roundcube-filter-edit.png))] Last, add a new rule to your default filter: [[Image(roundcube-define-filter-rule.png)]] == 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 [wiki:faq/files/sftp use Secure FTP] or [wiki:faq/security/secure-shell 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:Sieve_%28mail_filtering_language%29 Wikipedia Page on Sieve]. There is a good collection of resources on the [http://sieve.info/ sieve web site] as well. For tutorials, there is one [http://kb.vircom.com/Kbase/default.asp?id=1333 available from vircom.com] and another [https://www.tty1.net/blog/2011/sieve-tutorial_en.html available via tty1.net]. And for a complete reference, see [https://thsmi.github.io/sieve-reference/en/index.html thsmi's site]. Lastly, if you are running linux on your desktop client, you can install the [https://github.com/philpennock/sieve-connect sieve-connect] program which will help you upload your sieve scripts and make them active without requiring sftp/ssh access. There are a [http://sieve.info/clients 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.