Network Working Group W. Segmuller Request for Comment: 3431 IBM T.J. Watson Research Center Category: Standards Track December 2002 Sieve Extension: Relational Tests 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. Copyright Notice Copyright (C) The Internet Society (2002). All Rights Reserved.
AbstractThis 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. SIEVE] is a language for filtering e-mail messages at the time of final delivery. It is designed to be implementable on either a mail client or mail server. It is meant to be extensible, simple, and independent of access protocol, mail architecture, and operating system. It is suitable for running on a mail server where users may not be allowed to execute arbitrary programs, such as on black box Internet Messages Access Protocol (IMAP) servers, as it has no variables, loops, nor the ability to shell out to external programs. The RELATIONAL extension 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: are there more than 5 addresses in the to and cc fields. RFC 2119. Conventions for notations are as in [SIEVE] section 1.1, including the use of [KEYWORDS] and "Syntax:" label for the definition of action and tagged arguments syntax, and the use of [ABNF]. The capability string associated with extension defined in this document is "relational". SIEVE]. The "i;ascii-numeric" comparator, as defined in [ACAP], 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.
SIEVE]. An implementation MUST ensure that the test for envelope "to" only reflects the delivery to the current user. It MUST not be possible for a user to determine if this message was delivered to someone else using this test.
[SIEVE] Showalter, T., "Sieve: A Mail Filtering Language", RFC 3028, January 2001. [Keywords] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [ABNF] Crocker, D., "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 2001. [ACAP] Newman, C. and J. G. Myers, "ACAP -- Application Configuration Access Protocol", RFC 2244, November 1997.
Acknowledgement Funding for the RFC Editor function is currently provided by the Internet Society.