Sieve Filtering: Difference between revisions

From AAISP Support Site
Line 12: Line 12:


==Creating Sieve Filters==
==Creating Sieve Filters==
Our IMAP servers run 'ManageSieve', this is a service which clients talk to in order to create and edit sieve filters. ManageSieve runs on port 4910, and there are various clients which support ManageSieve, eg:
Our IMAP servers run 'ManageSieve', this is a service which clients talk to in order to create and edit sieve filters. ManageSieve runs on port 4910 on the IMAP servers. There are various clients which support ManageSieve, eg:
*RoundCube - our webmail has a Filters option in the settings
*RoundCube - our webmail has a Filters option in the settings
*[https://addons.mozilla.org/en-US/thunderbird/addon/sieve/ Extension for Thunderbird] (not that great)
*[https://addons.mozilla.org/en-US/thunderbird/addon/sieve/ Extension for Thunderbird] (fine for manually editing the script file)
*There are others, take a look at [www.sieve.info/clients sieve.info]


Whatever IMAP email program you use the Sieve filtering will still work. It may be easiest to create and edit the filters using Roundcube webmail even if you don't wish to use Roundcube for reading email.
Whatever IMAP email program you use the Sieve filtering will still work. It may be easiest to create and edit the filters using Roundcube webmail even if you don't wish to use Roundcube for reading email.
Line 26: Line 27:
[[File:Rc-filter.png]]
[[File:Rc-filter.png]]
This will then move emails from these addresses in to a separate folder.
This will then move emails from these addresses in to a separate folder.



==Converting From Mozilla Thunderbird to Sieve==
==Converting From Mozilla Thunderbird to Sieve==

Revision as of 15:16, 8 October 2012

THIS IS NOT AVAILABLE YET.

What is Sieve filtering?

At a basic level, Sieve is a system whereby the server is given rules be you to filter your email in to folders. It then means, that whatever email program you use, your email is already filed away in to it's correct folder according to your needs. Sieve can do more than just move email to their correct folder though.

It is helpful if you:

  • Use IMAP
  • Sort email in to folders
  • Read email from a number of devices

The server can now sort your email in to your folders rather than relying on one of clients to be on and do the work for you.

Creating Sieve Filters

Our IMAP servers run 'ManageSieve', this is a service which clients talk to in order to create and edit sieve filters. ManageSieve runs on port 4910 on the IMAP servers. There are various clients which support ManageSieve, eg:

  • RoundCube - our webmail has a Filters option in the settings
  • Extension for Thunderbird (fine for manually editing the script file)
  • There are others, take a look at [www.sieve.info/clients sieve.info]

Whatever IMAP email program you use the Sieve filtering will still work. It may be easiest to create and edit the filters using Roundcube webmail even if you don't wish to use Roundcube for reading email.


Using Roundcube Fitlers

To create a simple filter to move a few online shop emails in to a folder called shopping:

  1. First, create the Shopping folder (Settings-Folders, Click the Add button)
  2. go to Settings and Filters: Rc-filters.png
  3. Create a new filter set, and then a new filter:

Rc-filter.png This will then move emails from these addresses in to a separate folder.

Converting From Mozilla Thunderbird to Sieve

If you use Mozilla (eg Thunderbird) and have existing rules created, then they can be converted in to Sieve format on this page: mozilla2sieve.html. Here are some step by step instruction on moving the filters over:

  1. Open your msgFilterRules.dat file in a text editor (notepad, gedit etc)
    1. This file will be found in your 'Local directory', which can be found in Account Settings - Server Setting - look for the 'Local directory' box at the bottom.
  2. Copy and paste the text in to the converter
  3. Install the ThunderBird ManageSieve Addon:
    1. Tools - Addons - Search for Sieve, and Install 'Sieve 0.22'
  4. Go to Tools - Sieve Message Filters
    1. Click 'New...'
    2. give it a name, eg My Filters
    3. Paste in the results from the converter page
    4. Check that there are not any errors reported, then click Save.
    5. Close the tab with the script, and you'll be returned to the SieveFilters tab
    6. Click the little Active button so that it turns in to a green tick.
    7. Close that tab
  5. Disable the original Thunderbird filters:
    1. Either by closing Thunderbird and renaming the msgFilterRules.dat to something else (eg msgFilterRules.dat.old) or by unticking all the tick boxes under Tools - Message Filters.
  6. You can then view the filters via Roundcube webmail, which is easier to edit as it's more of a GUI editor rather than than a straight script editor like the Thuinderbird addon is.