idnits 2.17.1 draft-degener-sieve-editheader-01.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: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 267 lines 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 3 instances of too long lines in the document, the longest one being 3 characters in excess of 72. ** There are 25 instances of lines with control characters in the document. ** 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 61: '...eader. The name MUST be a valid 7-bit...' RFC 2119 keyword, line 66: '...the implementation MUST either flag an...' RFC 2119 keyword, line 71: '...n implementation MAY impose a length l...' RFC 2119 keyword, line 72: '...r field; such a limit MUST NOT be less...' RFC 2119 keyword, line 106: '... The field-name MUST be a valid 7-bit...' (3 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 199 has weird spacing: '...ription reque...' -- 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 (January 2004) is 7406 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 221 looks like a reference -- Missing reference section? 'KEYWORDS' on line 224 looks like a reference -- Missing reference section? 'RFC-2822' on line 218 looks like a reference -- Missing reference section? 'COMPARATOR' on line 94 looks like a reference -- Missing reference section? 'MATCH-TYPE' on line 94 looks like a reference Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group Jutta Degener 2 Internet Draft Sendmail, Inc. 3 Expires: July 2004 January 2004 5 Sieve -- "editheader" extension 6 8 Status of this memo 10 This document is an Internet-Draft and is subject to all 11 provisions of Section 10 of RFC2026. 13 Internet-Drafts are working documents of the Internet Engineering 14 Task Force (IETF), its areas, and its working groups. Note that 15 other groups may also distribute working documents as 16 Internet-Drafts. 18 Internet-Drafts are draft documents valid for a maximum of six 19 months and may be updated, replaced, or obsoleted by other 20 documents at any time. It is inappropriate to use Internet- 21 Drafts as reference material or to cite them other than as 22 "work in progress." 24 The list of current Internet-Drafts can be accessed at 25 http://www.ietf.org/1id-abstracts.html 27 The list of Internet-Draft Shadow Directories can be accessed at 28 http://www.ietf.org/shadow.html 30 Abstract 32 This document defines two new actions for the "sieve" 33 language that add and delete e-mail header fields. 35 1. Introduction 37 Email headers are a flexible and easy to understand means 38 of communication between email processors. 39 This extension enables sieve scripts to interact with other 40 components that consume or produce header fields by allowing 41 the script to delete and add header fields. 43 2. Conventions used. 45 Conventions for notations are as in [SIEVE] section 1.1, including 46 use of [KEYWORDS] and "Syntax:" label for the definition of action 47 and tagged arguments syntax. 49 The term "header field" is used here as in [RFC-2822] to mean a 50 logical line of an e-mail message header. 52 The capability string associated with extension defined in this 53 document is "editheader". 55 3. Action addheader 57 Syntax: 58 "addheader" [":last"] 60 The addheader action adds a header field to the existing 61 message header. The name MUST be a valid 7-bit US-ASCII header 62 field name as described by [RFC-2822] "field-name" nonterminal. 64 If the specified field value does not match the RFC 2822 65 "unstructured" nonterminal or exceeds a length limit set by 66 the implementation, the implementation MUST either flag an 67 error or encode the field using folding white space and the 68 encodings described in RFC 2047 or RFC 2231 to be compliant 69 with RFC 2822. 71 An implementation MAY impose a length limit onto the size of 72 the encoded header field; such a limit MUST NOT be less 73 than 998 characters, not including the terminating CRLF 74 supplied by the implementation. 76 By default, the header field is inserted at the beginning of 77 the existing header. If the optional flag ":last" is 78 specified, it is appended at the end. 80 Example: 81 /* Don't redirect if we already redirected */ 82 if not header :contains "X-Sieve-Filtered" 83 ["", ""] 84 { 85 addheader "X-Sieve-Filtered" ""; 86 redirect "kim@home.tld"; 87 } 89 4. Action deleteheader 91 Syntax: 92 "deleteheader" 93 [":index" [":last"]] 94 [COMPARATOR] [MATCH-TYPE] 95 96 [] 98 By default, the deleteheader action deletes all occurrences 99 of the named header field. 101 The field-name is mandatory and always matched as a 102 case-insensitive us-ascii string. The value-patterns, 103 if specified, are matched according to the match type and 104 comparator. If none are specified, all values match. 106 The field-name MUST be a valid 7-bit header field name as 107 described by the [RFC-2822] "field-name" nonterminal. 109 If :index is specified, the attempts to match 110 a value are limited to the header field (beginning 111 at 1, the first named header field). If :last is specified, 112 the count is backwards; 1 denotes the last named header field, 113 2 the second to last, and so on. The counting happens 114 before the match, if any; 116 deleteheader :index 2 :contains "Received" "via carrier-pidgeon" 118 deletes the second "Received:" header field if it contains 119 the string "via carrier-pidgeon" (not the second Received: field 120 that contains "via carrier-pidgeon"). 122 5. Interaction with Other Sieve Extensions 124 Tests and actions such as "exist" or "header" that examine 125 header fields MUST examine the current state of a header as 126 modified by any actions that have taken place so far. 128 As an example, the "header" test in the following fragment will 129 always evaluate to true, regardless of whether the incoming 130 message contained an "X-Hello" header field or not: 132 addheader "X-Hello" "World"; 133 if header :contains "X-Hello" "World" 134 { 135 fileinto "Hi"; 136 } 138 Actions that create messages in storage or in transport to 139 MTAs MUST store and send messages with the current set of 140 header fields. 142 A message modified by addheader or deleteheader MUST NOT 143 be considered the same as the original message unless it 144 matches the original message exactly. 146 For example, the following code fragment 148 keep; 149 addheader "X-Flavor: vanilla" 150 keep; 152 files two messages, not one. 154 The "implicit keep" is thought to be executed at the end of 155 the script, after the headers have been modified. 157 6. Security Considerations 159 Someone with write access to a user's script storage may use this 160 extension to generate headers that a user would otherwise be 161 shielded from (by a gateway MTA that removes them). 163 A sieve filter that removes headers may unwisely destroy 164 evidence about the path a header has taken. 166 Any change in a message content may interfere with digital 167 signature mechanisms that include the header in the signed 168 material. 170 Any decision mechanism in a user's filter that is based 171 on headers is vulnerable to header spoofing. For example, 172 if the user adds an APPROVED header or tag, a malicious sender 173 may add that tag or header themselves. One way to guard against 174 this is to delete or rename any such headers or stamps prior 175 to processing the message. 177 7. Acknowledgments 179 Thanks to Eric Allman, Ned Freed, Philip Guenther, Simon Josefsson, 180 Will Lee, Chris Markle, Randall Schwartz, Kjetil Torgrim Homme, 181 and Rand Wacker for extensive corrections and suggestions. 183 8. Author's Address 185 Jutta Degener 186 Sendmail, Inc. 187 6425 Christie Ave, 4th Floor 188 Emeryville, CA 94608 190 Email: jutta@sendmail.com 192 9. Discussion 194 This section will be removed when this document leaves the 195 Internet-Draft stage. 197 This draft is intended as an extension to the Sieve mail filtering 198 language. Sieve extensions are discussed on the MTA Filters mailing 199 list at . Subscription requests can 200 be sent to (send an email 201 message with the word "subscribe" in the body). 203 More information on the mailing list along with a WWW archive of 204 back messages is available at . 206 9.1 Changes from the previous version 208 Removed "replaceheader" action and reference to variables. 209 Expanded discussion of interactions with existing sieve primitives. 210 Referenced RFC 2822's definition of "header field". 211 Changed insertion position default to beginning of header, 212 and added :last parameter to restore the original default. 214 Appendices 216 Appendix A. References 218 [RFC-2822] Resnick, P., "Internet Message Format", RFC 2822, April 219 2001. 221 [SIEVE] Showalter, T., "Sieve: A Mail Filtering Language", RFC 3028, 222 January 2001. 224 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 225 Requirement Levels", RFC 2119, March 1997. 227 Appendix B. Full Copyright Statement 229 Copyright (C) The Internet Society 2004. All Rights Reserved. 231 This document and translations of it may be copied and furnished to 232 others, and derivative works that comment on or otherwise explain it 233 or assist in its implementation may be prepared, copied, published 234 and distributed, in whole or in part, without restriction of any 235 kind, provided that the above copyright notice and this paragraph 236 are included on all such copies and derivative works. However, this 237 document itself may not be modified in any way, such as by removing 238 the copyright notice or references to the Internet Society or other 239 Internet organizations, except as needed for the purpose of 240 developing Internet standards in which case the procedures for 241 copyrights defined in the Internet Standards process must be 242 followed, or as required to translate it into languages other than 243 English. 245 The limited permissions granted above are perpetual and will not be 246 revoked by the Internet Society or its successors or assigns. 248 This document and the information contained herein is provided on an 249 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 250 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 251 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 252 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 253 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.