Sieve Email Filtering: Relational Extension
RFC 5231
Document | Type |
RFC - Proposed Standard
(January 2008; No errata)
Obsoletes RFC 3431
|
|
---|---|---|---|
Authors | Barry Leiba , Wolfgang Segmuller | ||
Last updated | 2018-12-20 | ||
Stream | Internent Engineering Task Force (IETF) | ||
Formats | plain text html pdf htmlized (tools) htmlized bibtex | ||
Stream | WG state | (None) | |
Document shepherd | No shepherd assigned | ||
IESG | IESG state | RFC 5231 (Proposed Standard) | |
Action Holders |
(None)
|
||
Consensus Boilerplate | Unknown | ||
Telechat date | |||
Responsible AD | Scott Hollenbeck | ||
Send notices to | alexey.melnikov@isode.com |
Network Working Group W. Segmuller Request for Comments: 5231 B. Leiba Obsoletes: 3431 IBM T.J. Watson Research Center Category: Standards Track January 2008 Sieve Email Filtering: Relational Extension Status of This Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Abstract This document describes the RELATIONAL extension to the Sieve mail filtering language defined in RFC 3028. This extension extends existing conditional tests in Sieve to allow relational operators. In addition to testing their content, it also allows for testing of the number of entities in header and envelope fields. This document obsoletes RFC 3431. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Conventions Used in This Document . . . . . . . . . . . . . . . 2 3. Comparators . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4. Match Types . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4.1. Match Type VALUE . . . . . . . . . . . . . . . . . . . . . 3 4.2. Match Type COUNT . . . . . . . . . . . . . . . . . . . . . 3 5. Interaction with Other Sieve Actions . . . . . . . . . . . . . 4 6. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 7. Extended Example . . . . . . . . . . . . . . . . . . . . . . . 6 8. Changes since RFC 3431 . . . . . . . . . . . . . . . . . . . . 6 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 10. Security Considerations . . . . . . . . . . . . . . . . . . . . 7 11. Normative References . . . . . . . . . . . . . . . . . . . . . 7 Segmuller & Leiba Standards Track [Page 1] RFC 5231 Sieve: Relational Extension January 2008 1. Introduction The RELATIONAL extension to the Sieve mail filtering language [Sieve] provides relational operators on the address, envelope, and header tests. This extension also provides a way of counting the entities in a message header or address field. With this extension, the Sieve script may now determine if a field is greater than or less than a value instead of just equivalent. One use is for the x-priority field: move messages with a priority greater than 3 to the "work on later" folder. Mail could also be sorted by the from address. Those userids that start with 'a'-'m' go to one folder, and the rest go to another folder. The Sieve script can also determine the number of fields in the header, or the number of addresses in a recipient field, for example, whether there are more than 5 addresses in the to and cc fields. The capability string associated with the extension defined in this document is "relational". 2. Conventions Used in This Document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119. Conventions for notations are as in [Sieve] section 1.1, including the use of [Kwds] and the use of [ABNF]. 3. Comparators This document does not define any comparators or exempt any comparators from the require clause. Any comparator used must be treated as defined in [Sieve]. The "i;ascii-numeric" comparator, as defined in [RFC4790], MUST be supported for any implementation of this extension. The comparator "i;ascii-numeric" MUST support at least 32-bit unsigned integers. Larger integers MAY be supported. Note: the "i;ascii-numeric" comparator does not support negative numbers. Segmuller & Leiba Standards Track [Page 2] RFC 5231 Sieve: Relational Extension January 2008 4. Match Types This document defines two new match types. They are the VALUE match type and the COUNT match type. The syntax is: MATCH-TYPE =/ COUNT / VALUE COUNT = ":count" relational-match VALUE = ":value" relational-match relational-match = DQUOTE ("gt" / "ge" / "lt" / "le" / "eq" / "ne") DQUOTE ; "gt" means "greater than", the C operator ">". ; "ge" means "greater than or equal", the C operator ">=". ; "lt" means "less than", the C operator "<". ; "le" means "less than or equal", the C operator "<=". ; "eq" means "equal to", the C operator "==". ; "ne" means "not equal to", the C operator "!=". 4.1. Match Type VALUEShow full document text