idnits 2.17.1 draft-murchison-sieve-regex-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There are 7 instances of too long lines in the document, the longest one being 1 character in excess of 72. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 117: '... Implementations MUST support extended...' RFC 2119 keyword, line 123: '...expressions that MUST be supported. T...' 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 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 (10 March 2000) is 8785 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) -- Missing reference section? 'SIEVE' on line 223 looks like a reference -- Missing reference section? 'KEYWORDS' on line 220 looks like a reference Summary: 7 errors (**), 0 flaws (~~), 2 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group Ken Murchison 2 Document: draft-murchison-sieve-regex-00.txt Oceana Matrix Ltd. 3 Expires September 15, 2000 10 March 2000 5 Sieve -- Regular Expression Extension 7 Status of this Memo 9 This document is an Internet-Draft and is in full conformance with 10 all provisions of Section 10 of RFC2026. Internet-Drafts are working 11 documents of the Internet Engineering Task Force (IETF), its areas, 12 and its working groups. Note that other groups may also distribute 13 working documents as Internet-Drafts. 15 Internet-Drafts are draft documents valid for a maximum of six months 16 and may be updated, replaced, or obsoleted by other documents at any 17 time. It is inappropriate to use Internet-Drafts as reference 18 material or to cite them other than as "work in progress." 20 The list of current Internet-Drafts can be accessed at 21 http://www.ietf.org/ietf/1id-abstracts.txt 23 To view the list Internet-Draft Shadow Directories, see 24 http://www.ietf.org/shadow.html. 26 Distribution of this memo is unlimited. 28 Copyright Notice 30 Copyright (C) The Internet Society 2000. All Rights Reserved. 32 Abstract 34 In some cases, it is desirable to have a string matching mechanism 35 which is more powerful than a simple exact match, a substring match 36 or a glob-style wildcard match. The regular expression matching 37 mechanism defined in this draft should allow users to isolate just 38 about any string or address in a message header or envelope. 40 Table of Contents 42 Status of this Memo . . . . . . . . . . . . . . . . . . . . . . . . 1 44 Copyright Notice . . . . . . . . . . . . . . . . . . . . . . . . . . 1 46 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 48 0. Meta-information on this draft . . . . . . . . . . . . . . . 3 49 0.1. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 3 50 0.2. Changes since revision 00 . . . . . . . . . . . . . . . . . . 3 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. Capability Identifier . . . . . . . . . . . . . . . . . . . . 3 56 3. Regex Match Type . . . . . . . . . . . . . . . . . . . . . . 4 58 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 60 5. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 6 62 6. Author's Address . . . . . . . . . . . . . . . . . . . . . . 6 64 Appendix A. References . . . . . . . . . . . . . . . . . . . . . . 6 66 Appendix B. Full Copyright Statement . . . . . . . . . . . . . . . 6 67 0. Meta-information on this draft 69 This information is intended to facilitate discussion. It will be 70 removed when this document leaves the Internet-Draft stage. 72 0.1. Discussion 74 This draft is intended to be an extension to the Sieve mail filtering 75 language, available from the Internet-Drafts repository as 76 77 (where 09 is the version number, which is actually currently 09). 79 This draft and the Sieve language itself are being discussed on the 80 MTA Filters mailing list at . Subscription 81 requests can be sent to (send an 82 email message with the word "subscribe" in the body). More 83 information on the mailing list along with a WWW archive of back 84 messages is available at . 86 0.2. Changes since revision 00 88 Added POSIX.2 ERE summary. 90 Added examples. 92 Editorial changes. 94 1. Introduction 96 This is an extension to the Sieve language defined by [SIEVE] for 97 comparing strings to regular expressions. 99 Conventions for notations are as in [SIEVE] section 1.1, including 100 use of [KEYWORDS]. 102 2. Capability Identifier 104 The capability string associated with the extension defined in this 105 document is "regex". 107 3. Regex Match Type 109 Commands that support matching may take the optional tagged argument 110 ":regex" to specify that a regular expression match should be 111 performed. The ":regex" match type is subject to the same rules and 112 restrictions as the standard match types defined in [SIEVE]. 114 The ":regex" match type is compatible with both the "i;octet" and 115 "i;ascii-casemap" comparators and may be used with them. 117 Implementations MUST support extended regular expressions (EREs) as 118 defined by [POSIX.2]. Any regular expression not defined by 119 [POSIX.2], including [POSIX.2] basic regular expressions, word 120 boundaries and backreferences are not supported by this extension. 122 The following table provides a brief summary of the regular 123 expressions that MUST be supported. This table is presented here 124 only as a guideline. [POSIX.2] should be used as the definitive 125 reference. 127 NOTE: A double-backslash is needed to escape a special character, as 128 per section 2.4.2 of [SIEVE]. 130 +------------+-----------------------------------------------------+ 131 | Expression | Pattern | 132 +------------+-----------------------------------------------------+ 133 | Items to match a single character | 134 +------------+-----------------------------------------------------+ 135 | . | Match any single character except newline. | 136 | [ ] | Bracket expression. Match any one of the enclosed | 137 | | characters. A hypen (-) indicates a range of | 138 | | consecutive characters. | 139 | [^ ] | Negated bracket expression. Match any one | 140 | | character NOT in the enclosed list. A hypen (-) | 141 | | indicates a range of consecutive characters. | 142 | \\ | Escape the following special character (match | 143 | | the literal character). | 144 +------------+-----------------------------------------------------+ 145 | Items to be used within a bracket expression (localization) | 146 +------------+-----------------------------------------------------+ 147 | [: :] | Character class (alnum, alpha, blank, cntrl, | 148 | | digit, graph, lower, print, punct, space, | 149 | | upper, xdigit). | 150 | [= =] | Character equivalents. | 151 | [. .] | Collating sequence. | 152 +------------+-----------------------------------------------------+ 153 +------------+-----------------------------------------------------+ 154 | Expression | Pattern | 155 +------------+-----------------------------------------------------+ 156 | Quantifiers - Items to count the preceding regular expression | 157 +------------+-----------------------------------------------------+ 158 | ? | Match zero or one instances. | 159 | * | Match zero or more instances. | 160 | + | Match one or more instances. | 161 | {n,m} | Match any number of instances between | 162 | | n and m (inclusive). {n} matches exactly n | 163 | | instances. {n,} matches n or more instances. | 164 +------------+-----------------------------------------------------+ 165 | Anchoring - Items to match positions | 166 +------------+-----------------------------------------------------+ 167 | ^ | Match the beginning of the line or string. | 168 | $ | Match the end of the line or string. | 169 +------------+-----------------------------------------------------+ 170 | Other constructs | 171 +------------+-----------------------------------------------------+ 172 | | | Alternation. Match either of the separated | 173 | | regular expressions. | 174 | ( ) | Group the enclosed regular expression(s). | 175 +------------+-----------------------------------------------------+ 177 Example: 179 require "regex"; 181 # Try to catch unsolicited email. 182 if anyof ( 183 # if a message is not to me (with optional +detail), 184 not address :regex ["to", "cc", "bcc"] 185 "me(\\+.*)?@company.com", 187 # or the subject contains 2 or more dollar signs, 188 header :regex "subject" "\\$\\$+", 190 # or the subject is all uppercase (no lowercase) 191 header :regex :comparator "i;octet" "subject" 192 "^[^:lower:]*$" ) { 194 discard; # junk it 195 } 197 4. Security Considerations 199 Security considerations are discussed in [SIEVE]. It is believed 200 that this extension doesn't introduce any additional security 201 concerns. 203 5. Acknowledgments 205 Thanks to Tim Showalter and Alexey Melnikov for help with this 206 document. 208 6. Author's Address 210 Ken Murchison 211 Oceana Matrix Ltd. 212 21 Princeton Place 213 Orchard Park, NY 14127 215 Phone: (716) 662-8973 216 EMail: ken@oceana.com 218 Appendix A. References 220 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 221 Requirement Levels", Harvard University, RFC 2119, March, 1997. 223 [SIEVE] Showalter, T., "Sieve: A Mail Filtering Language", Mira- 224 point, Inc., Work In Progress. 226 [POSIX.2], "Portable Operating System Interface (POSIX). Part 2, 227 Shell and utilities", National Institute of Standards and Tech- 228 nology (U.S.). 230 Appendix B. Full Copyright Statement 232 Copyright (C) The Internet Society 2000. All Rights Reserved. 234 This document and translations of it may be copied and furnished to 235 others, and derivative works that comment on or otherwise explain it 236 or assist in its implementation may be prepared, copied, published 237 and distributed, in whole or in part, without restriction of any 238 kind, provided that the above copyright notice and this paragraph 239 are included on all such copies and derivative works. However, this 240 document itself may not be modified in any way, such as by removing 241 the copyright notice or references to the Internet Society or other 242 Internet organizations, except as needed for the purpose of develop- 243 ing Internet standards in which case the procedures for copyrights 244 defined in the Internet Standards process must be followed, or as 245 required to translate it into languages other than English. 247 The limited permissions granted above are perpetual and will not be 248 revoked by the Internet Society or its successors or assigns. 250 This document and the information contained herein is provided on an 251 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 252 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 253 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 254 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 255 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.