idnits 2.17.1 draft-ietf-sieve-3431bis-03.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 383. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 360. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 367. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 373. ** 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 (December 1, 2005) is 6714 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: June 4, 2006 December 1, 2005 7 Sieve Extension: Relational Tests 8 draft-ietf-sieve-3431bis-03 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 June 4, 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 The RELATIONAL extension to the Sieve mail filtering language [Sieve] 103 provides relational operators on the address, envelope, and header 104 tests. This extension also provides a way of counting the entities 105 in a message header or address field. 107 With this extension, the Sieve script may now determine if a field is 108 greater than or less than a value instead of just equivalent. One 109 use is for the x-priority field: move messages with a priority 110 greater than 3 to the "work on later" folder. Mail could also be 111 sorted by the from address. Those userids that start with 'a'-'m' go 112 to one folder, and the rest go to another folder. 114 The Sieve script can also determine the number of fields in the 115 header, or the number of addresses in a recipient field. For 116 example: are there more than 5 addresses in the to and cc fields. 118 The capability string associated with the extension defined in this 119 document is "relational". 121 3. Comparators 123 This document does not define any comparators or exempt any 124 comparators from the require clause. Any comparator used must be 125 treated as defined in [Sieve]. 127 The "i;ascii-numeric" comparator, as defined in [Comp], MUST be 128 supported for any implementation of this extension. The comparator 129 "i;ascii-numeric" MUST support at least 32 bit unsigned integers. 131 Larger integers MAY be supported. Note: the "i;ascii-numeric" 132 comparator does not support negative numbers. 134 4. Match Types 136 This document defines two new match types. They are the VALUE match 137 type and the COUNT match type. 139 The syntax is: 141 MATCH-TYPE =/ COUNT / VALUE 143 COUNT = ":count" relational-match 145 VALUE = ":value" relational-match 147 relational-match = DQUOTE 148 ("gt" / "ge" / "lt" / "le" / "eq" / "ne") DQUOTE 149 ; "gt" means "greater than", the C operator ">". 150 ; "ge" means "greater than or equal", the C operator ">=". 151 ; "lt" means "less than", the C operator "<". 152 ; "le" means "less than or equal", the C operator "<=". 153 ; "eq" means "equal to", the C operator "==". 154 ; "ne" means "not equal to", the C operator "!=". 156 4.1 Match Type VALUE 158 The VALUE match type does a relational comparison between strings. 160 The VALUE match type may be used with any comparator which returns 161 sort information. 163 A value from the message is considered the left side of the relation. 164 A value from the test expression, the key-list for address, envelope, 165 and header tests, is the right side of the relation. 167 If there are multiple values on either side or both sides, the test 168 is considered true if any pair is true. 170 4.2 Match Type COUNT 172 The COUNT match type first determines the number of the specified 173 entities in the message and does a relational comparison of the 174 number of entities, as defined below to the values specified in the 175 test expression. 177 The COUNT match type SHOULD only be used with numeric comparators. 179 The Address Test counts the number of addresses (the number of 180 "mailbox" elements, as defined in [RFC2822]) in the specified fields. 182 Group names are ignored, but the contained mailboxes are counted. 184 The Envelope Test counts the number of addresses in the specified 185 envelope parts. The envelope "to" will always have only one entry, 186 which is the address of the user for whom the Sieve script is 187 running. There is no way a Sieve script can determine if the message 188 was actually sent to someone else using this test. The envelope 189 "from" will be 0 if the MAIL FROM is empty, or 1 if MAIL FROM is not 190 empty. 192 The Header Test counts the total number of instances of the specified 193 fields. This does not count individual addresses in the "to", "cc", 194 and other recipient fields. 196 In all cases, if more than one field name is specified, the counts 197 for all specified fields are added together to obtain the number for 198 comparison. Thus, specifying ["to", "cc"] in an address COUNT test, 199 compares the total number of "to" and "cc" addresses; if separate 200 counts are desired, they must be done in two comparisons, perhaps 201 joined by "allof" or "anyof". 203 5. Interaction With Other Sieve Actions 205 This specification adds two match types. The VALUE match type only 206 works with comparators that return sort information. The COUNT match 207 type only makes sense with numeric comparators. 209 There is no interaction with any other Sieve operations, nor with any 210 known extensions. In particular, this specification has no effect on 211 implicit KEEP, nor on any explicit message actions. 213 6. Example 215 Using the message: 217 received: ... 218 received: ... 219 subject: example 220 to: foo@example.com, baz@example.com 221 cc: qux@example.com 223 The test: 225 address :count "ge" :comparator "i;ascii-numeric" 226 ["to", "cc"] ["3"] 228 would evaluate to true and the test 230 anyof ( address :count "ge" :comparator "i;ascii-numeric" 231 ["to"] ["3"], 232 address :count "ge" :comparator "i;ascii-numeric" 233 ["cc"] ["3"] ) 235 would evaluate to false. 237 To check the number of received fields in the header, the following 238 test may be used: 240 header :count "ge" :comparator "i;ascii-numeric" 241 ["received"] ["3"] 243 This would evaluate to false. But 245 header :count "ge" :comparator "i;ascii-numeric" 246 ["received", "subject"] ["3"] 248 would evaluate to true. 250 The test: 252 header :count "ge" :comparator "i;ascii-numeric" 253 ["to", "cc"] ["3"] 255 will always evaluate to false on an RFC 2822 compliant message 256 [RFC2822], since a message can have at most one "to" field and at 257 most one "cc" field. This test counts the number of fields, not the 258 number of addresses. 260 7. Extended Example 262 require ["relational", "comparator-i;ascii-numeric", "fileinto"]; 264 if header :value "lt" :comparator "i;ascii-numeric" 265 ["x-priority"] ["3"] 266 { 267 fileinto "Priority"; 268 } 270 elsif address :count "gt" :comparator "i;ascii-numeric" 271 ["to"] ["5"] 272 { 273 # everything with more than 5 recipients in the "to" field 274 # is considered SPAM 275 fileinto "SPAM"; 276 } 278 elsif address :value "gt" :all :comparator "i;ascii-casemap" 279 ["from"] ["M"] 280 { 281 fileinto "From N-Z"; 282 } else { 283 fileinto "From A-M"; 284 } 286 if allof ( address :count "eq" :comparator "i;ascii-numeric" 287 ["to", "cc"] ["1"] , 288 address :all :comparator "i;ascii-casemap" 289 ["to", "cc"] ["me@foo.example.com"] ) 290 { 291 fileinto "Only me"; 292 } 294 8. IANA Considerations 296 This document requests that the IANA update the entry for the 297 "relational" Sieve extension to point to this document. 299 9. Security Considerations 301 An implementation MUST ensure that the test for envelope "to" only 302 reflects the delivery to the current user. It MUST not be possible 303 for a user to determine if this message was delivered to someone else 304 using this test. 306 Additional security considerations are discussed in [Sieve]. 308 10. References 310 10.1 Normative References 312 [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 313 Specifications: ABNF", RFC 4234, October 2005. 315 [Kwds] Bradner, S., "Key words for use in RFCs to Indicate 316 Requirement Levels", RFC 2119, March 1997. 318 [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, 319 April 2001. 321 [Sieve] Guenther, P. and T. Showalter, "Sieve: An Email Filtering 322 Language", work in progress, draft-ietf-sieve-3028bis, 323 July 2005. 325 10.2 Non-Normative References 327 [Comp] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet 328 Application Protocol Collation Registry", work in 329 progress, draft-newman-i18n-comparator, September 2005. 331 Authors' Addresses 333 Wolfgang Segmuller 334 IBM T.J. Watson Research Center 335 19 Skyline Drive 336 Hawthorne, NY 10532 337 US 339 Phone: +1 914 784 7408 340 Email: werewolf@us.ibm.com 342 Barry Leiba 343 IBM T.J. Watson Research Center 344 19 Skyline Drive 345 Hawthorne, NY 10532 346 US 348 Phone: +1 914 784 7941 349 Email: leiba@watson.ibm.com 351 Intellectual Property Statement 353 The IETF takes no position regarding the validity or scope of any 354 Intellectual Property Rights or other rights that might be claimed to 355 pertain to the implementation or use of the technology described in 356 this document or the extent to which any license under such rights 357 might or might not be available; nor does it represent that it has 358 made any independent effort to identify any such rights. Information 359 on the procedures with respect to rights in RFC documents can be 360 found in BCP 78 and BCP 79. 362 Copies of IPR disclosures made to the IETF Secretariat and any 363 assurances of licenses to be made available, or the result of an 364 attempt made to obtain a general license or permission for the use of 365 such proprietary rights by implementers or users of this 366 specification can be obtained from the IETF on-line IPR repository at 367 http://www.ietf.org/ipr. 369 The IETF invites any interested party to bring to its attention any 370 copyrights, patents or patent applications, or other proprietary 371 rights that may cover technology that may be required to implement 372 this standard. Please address the information to the IETF at 373 ietf-ipr@ietf.org. 375 Disclaimer of Validity 377 This document and the information contained herein are provided on an 378 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 379 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 380 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 381 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 382 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 383 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 385 Copyright Statement 387 Copyright (C) The Internet Society (2005). This document is subject 388 to the rights, licenses and restrictions contained in BCP 78, and 389 except as set forth therein, the authors retain all their rights. 391 Acknowledgment 393 Funding for the RFC Editor function is currently provided by the 394 Internet Society.