SIEVE Language for Mail Filtering - Quick Guide
What is SIEVE? Why Use SIEVE FiltersMail traffic for most users has been increasing due to increased usage of e-mail, the emergence of unsolicited email as a form of advertising, and increased usage of mailing lists. There are a number of reasons to use the SIEVE filtering system:
The SIEVE Language1. General aspects SIEVE has a fixed form described as a standard but in can be improved by using extensions. The extension mechanism works if the system implements those extensions. In order to use an extension, it must be advertised at the beginning of the file (script) with a require clause. require "extension_name" The structure of SIEVE as described in the standard defines 5 actions: keep, fileinto, reject, discard, redirect which are self-explanatory. It also defines 3 control commands:
The if structure has the form: if <test> <block> elsif <test> <block> else <block> where a block is a block of commands (actions and control commands - including other ifs) In the standard form, without any extensions, the test can be one of the following:
2. Examples A simple example of a SIEVE script that will move all mails that have "Spam" in the subject or are received from "spammer@example.com", in the Spam folder can be written as follows: require "fileinto"Another, more complex example is a filter that will reject all mails that have a virus and are outgoing mails and not incoming mails. This latter example uses several extensions that need to be implemented. require ["envelope","virustest","relational","comparator-i;ascii-numeric","reject"];For a more detailed presentation of the SIEVE language we also advise you to read the dedicated RFC 3028. SIEVE filters in the AXIGEN Mail ServerCurrently, AXIGEN uses SIEVE language for script filter definition. Different user-defined SIEVE scripts can be included in any AXIGEN Filtering System. When activated in AXIGEN, each filter is assigned a priority value. The notion of priority is used to define the order of filters in the filtering chain. This means that filters with higher priority will be applied first. All SIEVE filters can be activated at multiple levels: server, domain or account/mail list. AXIGEN also implements the vacation SIEVE extension. This means that SIEVE script files can be created and applied for generating out-of-office type automatic replies. Thus, auto-generated messages can be send when the user of the account for which the vacation applies, is on vacation, out of office or in general away for an extended period of time. Although it is not a security function, vacation extension is an extra functionality available via script files. For an easy out-of-the office implementation in our mail server, please see this example available in our Knowledgebase. For detailed instructions on SIEVE language and scripts implementation in AXIGEN, please see our online documentation. |
|
This topic does not have any threads posted yet!
You cannot post until you login.