idnits 2.17.1 draft-murchison-sieve-regex-08.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 3667, Section 5.1 on line 15. -- Found old boilerplate from RFC 3978, Section 5.5 on line 322. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** The document seems to lack an RFC 3978 Section 5.4 Reference to BCP 78 -- however, there's a paragraph with a matching beginning. Boilerplate error? ** 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. ** The document seems to lack an RFC 3979 Section 5, para. 1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? ( - It does however have an RFC 2026 Section 10.4(A) Disclaimer.) ** The document seems to lack an RFC 3979 Section 5, para. 2 IPR Disclosure Acknowledgement. ** The document seems to lack an RFC 3979 Section 5, para. 3 IPR Disclosure Invitation -- however, there's a paragraph with a matching beginning. Boilerplate error? ( - It does however have an RFC 2026 Section 10.4(B) IPR Disclosure Invitation.) ** The document uses RFC 3667 boilerplate or RFC 3978-like boilerplate instead of verbatim RFC 3978 boilerplate. After 6 May 2005, submission of drafts without verbatim RFC 3978 boilerplate is not accepted. The following non-3978 patterns matched text found in the document. That text should be removed or replaced: By submitting this Internet-Draft, I certify that any applicable patent or other IPR claims of which I am aware have been disclosed, or will be disclosed, and any of which I become aware will be disclosed, in accordance with RFC 3668. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 13 instances of too long lines in the document, the longest one being 2 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- 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 (25 October 2004) is 7123 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 3028 (ref. 'SIEVE') (Obsoleted by RFC 5228, RFC 5429) Summary: 11 errors (**), 0 flaws (~~), 2 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Draft K. Murchison 3 Category: Standards Track Oceana Matrix Ltd. 4 Expires: April 30, 2005 25 October 2004 6 Sieve Email Filtering -- Regular Expression Extension 8 10 Status of this Memo 12 By submitting this Internet-Draft, I certify that any applicable 13 patent or other IPR claims of which I am aware have been disclosed, 14 and any of which I become aware will be disclosed, in accordance with 15 RFC 3668. 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 20 Internet-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 Copyright Notice 35 Copyright (C) The Internet Society (2004). 37 Abstract 39 In some cases, it is desirable to have a string matching mechanism 40 which is more powerful than a simple exact match, a substring match 41 or a glob-style wildcard match. The regular expression matching 42 mechanism defined in this draft should allow users to isolate just 43 about any string or address in a message header or envelope. 45 Table of Contents 47 Status of this Memo . . . . . . . . . . . . . . . . . . . . . . . . 1 49 Copyright Notice . . . . . . . . . . . . . . . . . . . . . . . . . . 1 51 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 53 0. Meta-information on this draft . . . . . . . . . . . . . . . 3 55 0.1. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 0.2. Noted Changes Since -07 . . . . . . . . . . . . . . . . . . . 3 59 0.3. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 63 2. Capability Identifier . . . . . . . . . . . . . . . . . . . . 4 65 3. Regex Match Type . . . . . . . . . . . . . . . . . . . . . . 4 67 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 69 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 71 6. Normative References . . . . . . . . . . . . . . . . . . . . 7 73 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7 75 8. Author's Address . . . . . . . . . . . . . . . . . . . . . . 7 77 9. Intellectual Property Rights . . . . . . . . . . . . . . . . 7 79 10. Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . 8 80 0. Meta-information on this draft 82 This information is intended to facilitate discussion. It will be 83 removed when this document leaves the Internet-Draft stage. 85 0.1. Discussion 87 This draft is intended to be an extension to the Sieve mail filtering 88 language, available from the RFC repository as 89 . 91 This draft and the Sieve language itself are being discussed on the 92 MTA Filters mailing list at . Subscription 93 requests can be sent to (send an 94 email message with the word "subscribe" in the body). More 95 information on the mailing list along with a WWW archive of back 96 messages is available at . 98 0.2. Noted Changes Since -07 100 Updated boilerplate. 102 0.3. Open Issues 104 The major open issue with this draft is what to do, if anything, 105 about localization/internationalization. Are [POSIX.2] collating 106 sequences and character equivalents sufficient? Should we reference 107 the unicode technical specification? Should we punt and publish the 108 document as experimental? 110 Should we allow shorthands such as \b (word boundary) and \w (word 111 character)? 113 Should we allow backreferences (useful for matching double words, 114 etc.)? 116 Should we integrate with variables, so that $1, $2, ... correspond 117 to the first, second, ... groups within the regex? 119 1. Introduction 121 This is an extension to the Sieve language defined by [SIEVE] for 122 comparing strings to regular expressions. 124 Conventions for notations are as in [SIEVE] section 1.1, including 125 use of [KEYWORDS]. 127 2. Capability Identifier 129 The capability string associated with the extension defined in this 130 document is "regex". 132 3. Regex Match Type 134 Commands that support matching may take the optional tagged argument 135 ":regex" to specify that a regular expression match should be 136 performed. The ":regex" match type is subject to the same rules and 137 restrictions as the standard match types defined in [SIEVE]. For 138 convenience, the "MATCH-TYPE" syntax element defined in [SIEVE] is 139 augmented here as follows: 141 MATCH-TYPE =/ ":regex" 143 Example: 145 require "regex"; 147 # Try to catch unsolicited email. 148 if anyof ( 149 # if a message is not to me (with optional +detail), 150 not address :regex ["to", "cc", "bcc"] 151 "me(\\+.*)?@company\\.com", 153 # or the subject is all uppercase (no lowercase) 154 header :regex :comparator "i;octet" "subject" 155 "^[^[:lower:]]+$" ) { 157 discard; # junk it 158 } 160 The ":regex" match type is compatible with both the "i;octet" and 161 "i;ascii-casemap" comparators and may be used with them. 163 Implementations MUST support extended regular expressions (EREs) as 164 defined by [POSIX.2]. Any regular expression not defined by 165 [POSIX.2], as well as [POSIX.2] basic regular expressions, word 166 boundaries and backreferences are not supported by this extension. 167 Implementations SHOULD reject regular expressions that are 168 unsupported by this specification as a syntax error. 170 The following table provides a brief summary of the regular 171 expressions that MUST be supported. This table is presented here 172 only as a guideline. [POSIX.2] should be used as the definitive 173 reference. 175 +------------+-----------------------------------------------------+ 176 | Expression | Pattern | 177 +------------+-----------------------------------------------------+ 178 | Items to match a single character | 179 +------------+-----------------------------------------------------+ 180 | . | Match any single character except newline. | 181 | [ ] | Bracket expression. Match any one of the enclosed | 182 | | characters. A hypen (-) indicates a range of | 183 | | consecutive characters. | 184 | [^ ] | Negated bracket expression. Match any one | 185 | | character NOT in the enclosed list. A hypen (-) | 186 | | indicates a range of consecutive characters. | 187 | \\ | Escape the following special character (match | 188 | | the literal character). Undefined for other | 189 | | characters. | 190 | | NOTE: Unlike [POSIX.2], a double-backslash is | 191 | | required as per section 2.4.2 of [SIEVE]. | 192 +------------+-----------------------------------------------------+ 193 | Items to be used within a bracket expression (localization) | 194 +------------+-----------------------------------------------------+ 195 | [: :] | Character class (alnum, alpha, blank, cntrl, | 196 | | digit, graph, lower, print, punct, space, | 197 | | upper, xdigit). | 198 | [= =] | Character equivalents. | 199 | [. .] | Collating sequence. | 200 +------------+-----------------------------------------------------+ 201 | Quantifiers - Items to count the preceding regular expression | 202 +------------+-----------------------------------------------------+ 203 | ? | Match zero or one instances. | 204 | * | Match zero or more instances. | 205 | + | Match one or more instances. | 206 | {n,m} | Match any number of instances between | 207 | | n and m (inclusive). {n} matches exactly n | 208 | | instances. {n,} matches n or more instances. | 209 +------------+-----------------------------------------------------+ 210 | Anchoring - Items to match positions | 211 +------------+-----------------------------------------------------+ 212 | ^ | Match the beginning of the line or string. | 213 | $ | Match the end of the line or string. | 214 +------------+-----------------------------------------------------+ 215 +------------+-----------------------------------------------------+ 216 | Expression | Pattern | 217 +------------+-----------------------------------------------------+ 218 | Other constructs | 219 +------------+-----------------------------------------------------+ 220 | | | Alternation. Match either of the separated | 221 | | regular expressions. | 222 | ( ) | Group the enclosed regular expression(s). | 223 +------------+-----------------------------------------------------+ 225 4. Security Considerations 227 Security considerations are discussed in [SIEVE]. It is believed 228 that this extension doesn't introduce any additional security 229 concerns. 231 However, a poor implementation COULD introduce security problems 232 ranging from degradation of performance to denial of service. If an 233 implementation uses a third-party regular expression library, that 234 library should be checked for potentially problematic regular 235 expressions, such as "(.*)*". 237 5. IANA Considerations 239 The following template specifies the IANA registration of the Sieve 240 extension specified in this document: 242 To: iana@iana.org 243 Subject: Registration of new Sieve extension 245 Capability name: regex 246 Capability keyword: regex 247 Capability arguments: N/A 248 Standards Track/IESG-approved experimental RFC number: this RFC 249 Person and email address to contact for further information: 251 Kenneth Murchison 252 ken@oceana.com 254 This information should be added to the list of sieve extensions 255 given on http://www.iana.org/assignments/sieve-extensions. 257 6. 258 Normative References 260 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 261 Requirement Levels", RFC 2119, March 1997. 263 [SIEVE] Showalter, T., "Sieve: A Mail Filtering Language", RFC 264 3028, January 2001. 266 [POSIX.2], "Portable Operating System Interface (POSIX). Part 2, 267 Shell and utilities", National Institute of Standards and Tech- 268 nology (U.S.). 270 7. Acknowledgments 272 Thanks to Tim Showalter, Alexey Melnikov, Tony Hansen, Phil Pennock, 273 Jutta Degener and Ned Freed for their help with this document. 275 8. Author's Address 277 Kenneth Murchison 278 Oceana Matrix Ltd. 279 21 Princeton Place 280 Orchard Park, NY 14127 282 Phone: (716) 662-8973 284 EMail: ken@oceana.com 286 9. 287 Intellectual Property Rights 289 The IETF takes no position regarding the validity or scope of any 290 intellectual property or other rights that might be claimed to 291 pertain to the implementation or use of the technology described in 292 this document or the extent to which any license under such rights 293 might or might not be available; neither does it represent that it has 294 made any effort to identify any such rights. Information on the 295 IETF's procedures with respect to rights in standards-track and 296 standards-related documentation can be found in BCP-11. Copies of 297 claims of rights made available for publication and any assurances of 298 licenses to be made available, or the result of an attempt made to 299 obtain a general license or permission for the use of such proprietary 300 rights by implementers or users of this specification can be obtained 301 from the IETF Secretariat. 303 The IETF invites any interested party to bring to its attention any 304 copyrights, patents or patent applications, or other proprietary 305 rights which may cover technology that may be required to practice 306 this standard. Please address the information to the IETF Executive 307 Director. 309 10. 310 Copyright 312 Copyright (C) The Internet Society (2004). This document is subject 313 to the rights, licenses and restrictions contained in BCP 78, and 314 except as set forth therein, the authors retain all their rights." 316 This document and the information contained herein are provided on an 317 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 318 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 319 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 320 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 321 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 322 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 324 y