idnits 2.17.1 draft-ietf-sieve-3431bis-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 15. -- Found old boilerplate from RFC 3978, Section 5.5 on line 390. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 367. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 374. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 380. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC3431, but the abstract doesn't seem to directly say this. It does mention RFC3431 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: 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. -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (November 17, 2005) is 6734 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 4234 (ref. 'ABNF') (Obsoleted by RFC 5234) ** Obsolete normative reference: RFC 2822 (Obsoleted by RFC 5322) Summary: 5 errors (**), 0 flaws (~~), 3 warnings (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Sieve Working Group W. Segmuller 3 Internet-Draft B. Leiba 4 Obsoletes: 3431 (if approved) IBM T.J. Watson Research Center 5 Expires: May 21, 2006 November 17, 2005 7 Sieve Extension: Relational Tests 8 draft-ietf-sieve-3431bis-02 10 Status of this Memo 12 By submitting this Internet-Draft, each author represents that any 13 applicable patent or other IPR claims of which he or she is aware 14 have been or will be disclosed, and any of which he or she becomes 15 aware will be disclosed, in accordance with Section 6 of BCP 79. 17 Internet-Drafts are working documents of the Internet Engineering 18 Task Force (IETF), its areas, and its working groups. Note that 19 other groups may also distribute working documents as Internet- 20 Drafts. 22 Internet-Drafts are draft documents valid for a maximum of six months 23 and may be updated, replaced, or obsoleted by other documents at any 24 time. It is inappropriate to use Internet-Drafts as reference 25 material or to cite them other than as "work in progress." 27 The list of current Internet-Drafts can be accessed at 28 http://www.ietf.org/ietf/1id-abstracts.txt. 30 The list of Internet-Draft Shadow Directories can be accessed at 31 http://www.ietf.org/shadow.html. 33 This Internet-Draft will expire on May 21, 2006. 35 Copyright Notice 37 Copyright (C) The Internet Society (2005). 39 Abstract 41 This document describes the RELATIONAL extension to the Sieve mail 42 filtering language defined in RFC 3028. This extension extends 43 existing conditional tests in Sieve to allow relational operators. 44 In addition to testing their content, it also allows for testing of 45 the number of entities in header and envelope fields. 47 Note 48 This document is intended to be an update to the existing 49 "relational" extension to the Sieve mail filtering language, 50 available from the RFC repository as 51 ftp://ftp.isi.edu/in-notes/rfc3431.txt. 53 This document and the Sieve language itself are being discussed on 54 the MTA Filters mailing list at mailto:ietf-mta-filters@imc.org. 55 Subscription requests can be sent to 56 mailto:ietf-mta-filters-request@imc.org?body=subscribe (send an email 57 message with the word "subscribe" in the body). More information on 58 the mailing list along with a WWW archive of back messages is 59 available at http://www.imc.org/ietf-mta-filters/. 61 Table of Contents 63 1. Conventions used in this document . . . . . . . . . . . . . 3 65 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 67 3. Comparators . . . . . . . . . . . . . . . . . . . . . . . . 5 69 4. Match Types . . . . . . . . . . . . . . . . . . . . . . . . 6 70 4.1 Match Type VALUE . . . . . . . . . . . . . . . . . . . . . . 6 71 4.2 Match Type COUNT . . . . . . . . . . . . . . . . . . . . . . 6 73 5. Interaction With Other Sieve Actions . . . . . . . . . . . . 8 75 6. Example . . . . . . . . . . . . . . . . . . . . . . . . . . 9 77 7. Extended Example . . . . . . . . . . . . . . . . . . . . . . 10 79 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . 11 81 9. Security Considerations . . . . . . . . . . . . . . . . . . 12 83 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 84 10.1 Normative References . . . . . . . . . . . . . . . . . . . . 13 85 10.2 Non-Normative References . . . . . . . . . . . . . . . . . . 13 87 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 13 89 Intellectual Property and Copyright Statements . . . . . . . 14 91 1. Conventions used in this document 93 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 94 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 95 document are to be interpreted as described in BCP 14, RFC 2119. 97 Conventions for notations are as in [Sieve] section 1.1, including 98 the use of [Kwds] and the use of [ABNF]. 100 2. Introduction 102 [Sieve] is a language for filtering e-mail messages at the time of 103 final delivery. It is designed to be implementable on either a mail 104 client or mail server. It is meant to be extensible, simple, and 105 independent of access protocol, mail architecture, and operating 106 system. It is suitable for running on a mail server where users may 107 not be allowed to execute arbitrary programs, such as on black box 108 Internet Messages Access Protocol (IMAP) servers, as it has no 109 variables, loops, nor the ability to shell out to external programs. 111 The RELATIONAL extension provides relational operators on the 112 address, envelope, and header tests. This extension also provides a 113 way of counting the entities in a message header or address field. 115 With this extension, the Sieve script may now determine if a field is 116 greater than or less than a value instead of just equivalent. One 117 use is for the x-priority field: move messages with a priority 118 greater than 3 to the "work on later" folder. Mail could also be 119 sorted by the from address. Those userids that start with 'a'-'m' go 120 to one folder, and the rest go to another folder. 122 The Sieve script can also determine the number of fields in the 123 header, or the number of addresses in a recipient field. For 124 example: are there more than 5 addresses in the to and cc fields. 126 The capability string associated with the extension defined in this 127 document is "relational". 129 3. Comparators 131 This document does not define any comparators or exempt any 132 comparators from the require clause. Any comparator used must be 133 treated as defined in [Sieve]. 135 The "i;ascii-numeric" comparator, as defined in [Comp], MUST be 136 supported for any implementation of this extension. The comparator 137 "i;ascii-numeric" MUST support at least 32 bit unsigned integers. 139 Larger integers MAY be supported. Note: the "i;ascii-numeric" 140 comparator does not support negative numbers. 142 4. Match Types 144 This document defines two new match types. They are the VALUE match 145 type and the COUNT match type. 147 The syntax is: 149 MATCH-TYPE =/ COUNT / VALUE 151 COUNT = ":count" relational-match 153 VALUE = ":value" relational-match 155 relational-match = DQUOTE 156 ("gt" / "ge" / "lt" / "le" / "eq" / "ne") DQUOTE 157 ; "gt" means "greater than", the C operator ">". 158 ; "ge" means "greater than or equal", the C operator ">=". 159 ; "lt" means "less than", the C operator "<". 160 ; "le" means "less than or equal", the C operator "<=". 161 ; "eq" means "equal to", the C operator "==". 162 ; "ne" means "not equal to", the C operator "!=". 164 4.1 Match Type VALUE 166 The VALUE match type does a relational comparison between strings. 168 The VALUE match type may be used with any comparator which returns 169 sort information. 171 A value from the message is considered the left side of the relation. 172 A value from the test expression, the key-list for address, envelope, 173 and header tests, is the right side of the relation. 175 If there are multiple values on either side or both sides, the test 176 is considered true if any pair is true. 178 4.2 Match Type COUNT 180 The COUNT match type first determines the number of the specified 181 entities in the message and does a relational comparison of the 182 number of entities, as defined below to the values specified in the 183 test expression. 185 The COUNT match type SHOULD only be used with numeric comparators. 187 The Address Test counts the number of addresses (the number of 188 "mailbox" elements, as defined in [RFC2822]) in the specified fields. 190 Group names are ignored, but the contained mailboxes are counted. 192 The Envelope Test counts the number of addresses in the specified 193 envelope parts. The envelope "to" will always have only one entry, 194 which is the address of the user for whom the Sieve script is 195 running. There is no way a Sieve script can determine if the message 196 was actually sent to someone else using this test. The envelope 197 "from" will be 0 if the MAIL FROM is empty, or 1 if MAIL FROM is not 198 empty. 200 The Header Test counts the total number of instances of the specified 201 fields. This does not count individual addresses in the "to", "cc", 202 and other recipient fields. 204 In all cases, if more than one field name is specified, the counts 205 for all specified fields are added together to obtain the number for 206 comparison. Thus, specifying ["to", "cc"] in an address COUNT test, 207 compares the total number of "to" and "cc" addresses; if separate 208 counts are desired, they must be done in two comparisons, perhaps 209 joined by "allof" or "anyof". 211 5. Interaction With Other Sieve Actions 213 This specification adds two match types. The VALUE match type only 214 works with comparators that return sort information. The COUNT match 215 type only makes sense with numeric comparators. 217 There is no interaction with any other Sieve operations, nor with any 218 known extensions. In particular, this specification has no effect on 219 implicit KEEP, nor on any explicit message actions. 221 6. Example 223 Using the message: 225 received: ... 226 received: ... 227 subject: example 228 to: foo@example.com, baz@example.com 229 cc: qux@example.com 231 The test: 233 address :count "ge" :comparator "i;ascii-numeric" 234 ["to", "cc"] ["3"] 236 would evaluate to true and the test 238 anyof ( address :count "ge" :comparator "i;ascii-numeric" 239 ["to"] ["3"], 240 address :count "ge" :comparator "i;ascii-numeric" 241 ["cc"] ["3"] ) 243 would evaluate to false. 245 To check the number of received fields in the header, the following 246 test may be used: 248 header :count "ge" :comparator "i;ascii-numeric" 249 ["received"] ["3"] 251 This would evaluate to false. But 253 header :count "ge" :comparator "i;ascii-numeric" 254 ["received", "subject"] ["3"] 256 would evaluate to true. 258 The test: 260 header :count "ge" :comparator "i;ascii-numeric" 261 ["to", "cc"] ["3"] 263 will always evaluate to false on an RFC 2822 compliant message 264 [RFC2822], since a message can have at most one "to" field and at 265 most one "cc" field. This test counts the number of fields, not the 266 number of addresses. 268 7. Extended Example 270 require ["relational", "comparator-i;ascii-numeric", "fileinto"]; 272 if header :value "lt" :comparator "i;ascii-numeric" 273 ["x-priority"] ["3"] 274 { 275 fileinto "Priority"; 276 } 278 elsif address :count "gt" :comparator "i;ascii-numeric" 279 ["to"] ["5"] 280 { 281 # everything with more than 5 recipients in the "to" field 282 # is considered SPAM 283 fileinto "SPAM"; 284 } 286 elsif address :value "gt" :all :comparator "i;ascii-casemap" 287 ["from"] ["M"] 288 { 289 fileinto "From N-Z"; 290 } else { 291 fileinto "From A-M"; 292 } 294 if allof ( address :count "eq" :comparator "i;ascii-numeric" 295 ["to", "cc"] ["1"] , 296 address :all :comparator "i;ascii-casemap" 297 ["to", "cc"] ["me@foo.example.com"] ) 298 { 299 fileinto "Only me"; 300 } 302 8. IANA Considerations 304 This document requests that the IANA update the entry for the 305 "relational" Sieve extension to point to this document. 307 9. Security Considerations 309 An implementation MUST ensure that the test for envelope "to" only 310 reflects the delivery to the current user. It MUST not be possible 311 for a user to determine if this message was delivered to someone else 312 using this test. 314 Additional security considerations are discussed in [Sieve]. 316 10. References 318 10.1 Normative References 320 [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 321 Specifications: ABNF", RFC 4234, November 1997. 323 [Kwds] Bradner, S., "Key words for use in RFCs to Indicate 324 Requirement Levels", RFC 2119, March 1997. 326 [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, 327 April 2001. 329 [Sieve] Guenther, P. and T. Showalter, "Sieve: An Email Filtering 330 Language", I-D draft-ietf-sieve-3028bis, July 2005. 332 10.2 Non-Normative References 334 [Comp] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet 335 Application Protocol Collation Registry", 336 I-D draft-newman-i18n-comparator, September 2005. 338 Authors' Addresses 340 Wolfgang Segmuller 341 IBM T.J. Watson Research Center 342 19 Skyline Drive 343 Hawthorne, NY 10532 344 US 346 Phone: +1 914 784 7408 347 Email: werewolf@us.ibm.com 349 Barry Leiba 350 IBM T.J. Watson Research Center 351 19 Skyline Drive 352 Hawthorne, NY 10532 353 US 355 Phone: +1 914 784 7941 356 Email: leiba@watson.ibm.com 358 Intellectual Property Statement 360 The IETF takes no position regarding the validity or scope of any 361 Intellectual Property Rights or other rights that might be claimed to 362 pertain to the implementation or use of the technology described in 363 this document or the extent to which any license under such rights 364 might or might not be available; nor does it represent that it has 365 made any independent effort to identify any such rights. Information 366 on the procedures with respect to rights in RFC documents can be 367 found in BCP 78 and BCP 79. 369 Copies of IPR disclosures made to the IETF Secretariat and any 370 assurances of licenses to be made available, or the result of an 371 attempt made to obtain a general license or permission for the use of 372 such proprietary rights by implementers or users of this 373 specification can be obtained from the IETF on-line IPR repository at 374 http://www.ietf.org/ipr. 376 The IETF invites any interested party to bring to its attention any 377 copyrights, patents or patent applications, or other proprietary 378 rights that may cover technology that may be required to implement 379 this standard. Please address the information to the IETF at 380 ietf-ipr@ietf.org. 382 Disclaimer of Validity 384 This document and the information contained herein are provided on an 385 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 386 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 387 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 388 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 389 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 390 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 392 Copyright Statement 394 Copyright (C) The Internet Society (2005). This document is subject 395 to the rights, licenses and restrictions contained in BCP 78, and 396 except as set forth therein, the authors retain all their rights. 398 Acknowledgment 400 Funding for the RFC Editor function is currently provided by the 401 Internet Society.