Sieve Filtering: Difference between revisions
Appearance
Content deleted Content added
Thunderbird plugin no longer works, try sieve-connect |
Interaction between Spam checking and Sieve filtering |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
= What is Sieve filtering? = |
= What is Sieve filtering? = |
||
At a basic level, Sieve is a system whereby the server is given rules by you to filter your email into folders. It then means that, whatever email program you use, your email is already filed away in to their correct folder according to your needs. |
At a basic level, Sieve is a system whereby the server is given rules by you to process incoming email - e.g. forward emails, discard emails, or filter your email into folders. It then means that, whatever email program you use, your email is already filed away in to their correct folder according to your needs. |
||
It is helpful if you: |
It is helpful if you: |
||
| Line 10: | Line 10: | ||
*Read email from a number of devices |
*Read email from a number of devices |
||
This page explains how to connect |
This page explains how to connect to our sieve server using Roundcube or other ManageSieve client software, and gives some examples and also further about Sieve and the features we have enabled |
||
=Sieve Server Settings= |
=Sieve Server Settings= |
||
| Line 46: | Line 46: | ||
*Maximum number of actions = 128 |
*Maximum number of actions = 128 |
||
# Numbered list item |
|||
== 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 4190 on the IMAP servers. There are various clients which support ManageSieve, e.g.: |
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 4190 on the IMAP servers. There are various clients which support ManageSieve, e.g.: |
||
| ⚫ | |||
*RoundCube - our web |
|||
# Numbered list item |
|||
| ⚫ | |||
*[https://github.com/thsmi/sieve/releases Extension for Thunderbird] (fine for manually editing the script file) '''Important note:''' Use the latest version if the one from the Thunderbird is out of date. [https://github.com/thsmi/sieve/releases latest] version version 0.3 or higher should be ok. '''No longer works with Thunderbird versions dating from 2023'''. |
*[https://github.com/thsmi/sieve/releases Extension for Thunderbird] (fine for manually editing the script file) '''Important note:''' Use the latest version if the one from the Thunderbird is out of date. [https://github.com/thsmi/sieve/releases latest] version version 0.3 or higher should be ok. '''No longer works with Thunderbird versions dating from 2023'''. |
||
*[https://www.claws-mail.org/plugin.php?plugin=managesieve Extension for claws-mail] (may be packaged as claws-mail-managesieve). Very similar to the Thunderbird extension. |
*[https://www.claws-mail.org/plugin.php?plugin=managesieve Extension for claws-mail] (may be packaged as claws-mail-managesieve). Very similar to the Thunderbird extension. |
||
| Line 64: | Line 61: | ||
== Using Roundcube Filters == |
== Using Roundcube Filters == |
||
Roundcube will let you create filters using a WYSIWYG style editor - with easy to use drop-down options and so on. You can |
Roundcube will let you create filters using a WYSIWYG style editor - with easy to use drop-down options and so on. You can also edit the sieve code in 'raw' format - select 'Actions', 'Edit filter set' (it's the way to move rules up or down the order). |
||
To create a simple filter to move a few online shop emails in to a folder called shopping: |
To create a simple filter to move a few online shop emails in to a folder called shopping: |
||
| Line 80: | Line 77: | ||
=Other Sieve Notes= |
=Other Sieve Notes= |
||
*When using fileinto: with :create, a new folder will be created if it does not already exist, this is normal. In this case, the new folder will be subscribed to automatically. -You may need to restart your client (e.g. Thunderbird) for it to notice that there is a new folder that should be listed. |
*When using fileinto: with :create, a new folder will be created if it does not already exist, this is normal. In this case, the new folder will be subscribed to automatically. -You may need to restart your client, or collapse and reopen the folder list (e.g. Thunderbird), for it to notice that there is a new folder that should be listed. |
||
*spam folder: If you have a folder called spam then email which is marked as spam will end up there bypassing any |
*spam folder: If you have a folder called 'spam' then email which is marked as spam will end up there bypassing any Sieve filters. If you do not wish to happen then rename or delete the folder called 'spam', and add a filter to move spam marked messages to another folder (e.g. junk, rubbish, etc.) '''Update November 2023''': this appears not to be the case - the 'spam' folder is automatically created, but messages are processed by the spam engines, and then passed through Sieve filtering so you can decide what to do with the spam using your Sieve rules. To recreate the previous behaviour (and perhaps extend it a little) you might need a rule like: |
||
require ["fileinto","mailbox"]; |
|||
if exists "X-Spam-Flag" { |
|||
if header :is "X-Spam-Flag" "YES" { |
|||
if exists "X-Spam-Bar" { |
|||
# 20 OR MORE + |
|||
if header :contains "X-Spam-Bar" "++++++++++++++++++++" { |
|||
# Can't reject, not supported |
|||
fileinto :create "bad-spam"; |
|||
stop; |
|||
} |
|||
} |
|||
fileinto :create "spam"; |
|||
stop; |
|||
} |
|||
} |
|||
=Some Examples= |
=Some Examples= |
||