idnits 2.17.1 draft-freed-sieve-notary-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (See https://trustee.ietf.org/license-info/) 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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors 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 (March 23, 2010) is 5148 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 informational reference (is this intentional?): RFC 3501 (Obsoleted by RFC 9051) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group N. Freed 3 Internet-Draft Sun Microsystems 4 Expires: September 24, 2010 March 23, 2010 6 Sieve Email Filtering: Delivery Status Notifications and Deliver-By 7 Extensions 8 draft-freed-sieve-notary-06 10 Abstract 12 This document describes the "envelope-dsn", "redirect-dsn", 13 "envelope-deliverby", and "redirect-deliverby" extensions to the 14 Sieve email filtering language. The "envelope-dsn" and "envelope- 15 deliverby" extensions provide access to additional envelope 16 information provided by the delivery status notification and 17 deliver-by SMTP extensions. The "redirect-dsn" and "redirect- 18 deliverby" extensions extend Sieve's redirect action to provide 19 control over delivery status notification and deliver-by parameters, 20 respectively. 22 Change History (to be removed prior to publication as an RFC 24 Fixed several typos. 26 Changed name of extension from notary to envelope-dsn. 28 Added the redirect-dsn extension. 30 Updated references. 32 Added a note about the use of ADDRESS-PART arguments with the new 33 envelope-part strings defined by the envelope-dsn extension. 35 Fleshed out the redirect-dsn extension. 37 Changed document title to agree with new extension names. 39 Added some examples. 41 Fixed more typos. 43 Changed dsn-envelope and dsn-redirect to envelope-dsn and redirect- 44 dsn, respectively. 46 Added a redirect-dsn example. 48 Added the two deliver-by extensions. 50 Status of this Memo 52 This Internet-Draft is submitted to IETF in full conformance with the 53 provisions of BCP 78 and BCP 79. 55 Internet-Drafts are working documents of the Internet Engineering 56 Task Force (IETF), its areas, and its working groups. Note that 57 other groups may also distribute working documents as Internet- 58 Drafts. 60 Internet-Drafts are draft documents valid for a maximum of six months 61 and may be updated, replaced, or obsoleted by other documents at any 62 time. It is inappropriate to use Internet-Drafts as reference 63 material or to cite them other than as "work in progress." 65 The list of current Internet-Drafts can be accessed at 66 http://www.ietf.org/ietf/1id-abstracts.txt. 68 The list of Internet-Draft Shadow Directories can be accessed at 69 http://www.ietf.org/shadow.html. 71 This Internet-Draft will expire on September 24, 2010. 73 Copyright Notice 75 Copyright (c) 2010 IETF Trust and the persons identified as the 76 document authors. All rights reserved. 78 This document is subject to BCP 78 and the IETF Trust's Legal 79 Provisions Relating to IETF Documents 80 (http://trustee.ietf.org/license-info) in effect on the date of 81 publication of this document. Please review these documents 82 carefully, as they describe your rights and restrictions with respect 83 to this document. Code Components extracted from this document must 84 include Simplified BSD License text as described in Section 4.e of 85 the Trust Legal Provisions and are provided without warranty as 86 described in the BSD License. 88 1. Introduction 90 Sieve [RFC5228] is a language for filtering email messages at or 91 around the time of final delivery. It is designed to be 92 implementable on either a mail client or mail server. It is suitable 93 for running on a mail server where users may not be allowed to 94 execute arbitrary programs, such as on black box Internet Message 95 Access Protocol [RFC3501] servers, as it has no user-controlled loops 96 or the ability to run external programs. 98 The base sieve specification defines the envelope extension and test 99 to access information in the message envelope. Only information 100 available in regular SMTP is provided; additional information added 101 to the SMTP envelope by SMTP extensions cannot be accessed. 103 The "envelope-dsn" extension extends the envelope test to allow 104 access to the additional envelope fields defined by the SMTP 105 extension for delivery status notification specified in RFC 3461 106 [RFC3461]. The "envelope-deliverby" extension extends the envelope 107 test to allow access to the additional envelope fields defined by the 108 deliver-by SMTP extension defined in [RFC2852]. 110 The base sieve specification also defines the redirect action which 111 sends the message to a different address. Redirect only allows 112 specification of the new recipient address. The "redirect-dsn" 113 extension extends redirect to allow specification of some fields 114 defined by the delivery status notification SMTP extension. 115 "redirect-deliverby" in turn provides the ability to set a time limit 116 for delivery as specified in RFC 2852 [RFC2852]. 118 2. Conventions used in this document 120 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 121 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 122 document are to be interpreted as described in [RFC2119]. 124 The terms used to describe the various components of the Sieve 125 language are taken from Section 1.1 of [RFC5228]. 127 This document uses the ABNF notation specified in [RFC5234], and 128 refers to the ABNF productions notify-esmtp-value defined in Section 129 4.1 of [RFC3461]. 131 3. Capability Identifier 133 The capability strings associated with the extensions defined in this 134 document are "envelope-dsn", "redirect-dsn", "envelope-deliverby", 135 and "redirect-deliverby". 137 4. Envelope-dsn Extension 139 The "envelope-dsn" extension does not define any new tests or 140 actions, rather, it adds four values to the list of possible (case- 141 insensitive) envelope-part strings defined in Section 5.4 of 142 [RFC5228]: 144 notify - Match the list of notification conditions, or NOTIFY 145 values, associated with the TO address used in the SMTP RCPT TO 146 command that resulted in this message getting delivered to this 147 user. More than one notification condition can be in effect at 148 once; each condition that is in effect is tested separately and 149 any match causes the test to succeed. The syntax and semantics of 150 the NOTIFY parameter are defined in Section 4.1 of RFC 3461 151 [RFC3461] . Currently the possible notification condition values 152 are "NEVER", "SUCCESS", "FAILURE" and "DELAY". Note that the 153 value "NEVER" cannot be combined with any other value. 155 orcpt - Match the original recipient, or ORCPT, value in decoded 156 form associated with the TO address used in the SMTP RCPT TO 157 command that resulted in this message getting delivered to this 158 user. The syntax and semantics of the ORCPT parameter are defined 159 in Section 4.2 of RFC 3461 [RFC3461]. 161 ret - Match the return of content, or RET, value given in the SMTP 162 MAIL FROM command. The syntax and semantics of the RET parameter 163 are defined in Section 4.3 of RFC 3461 [RFC3461]. Currently the 164 possible return of content values are "FULL" and "HDRS". 166 envid - Match the envelope identifier, or ENVID, value in decoded 167 form given in the SMTP MAIL FROM command. The syntax and 168 semantics of the ENVID parameter are defined in Section 4.4 of RFC 169 3461 [RFC3461]. 171 All of these tests fail unconditionally if the specified envelope 172 parameter does not exist for the current message or recipient. 174 The envelope test's ADDRESS-PART argument assumes the string being 175 tested has the syntax of an email address. None of the new envelope 176 parts defined here have address syntax, accordingly, it is an error 177 to specify an ADDRESS-PART argument in conjunction with these new 178 envelope parts. 180 The "relational" extension [RFC5231] adds a match type called 181 ":count". The count of an envelope test with an envelope-part of 182 "orcpt", "ret", and "envid" is 1 if the corresponding SMTP parameter 183 is present and 0 otherwise. The count of an envelope test with an 184 envelope-part of "notify" is equal to the number of notification 185 conditions specified and 0 if the NOTIFY parameter is not present. 187 4.1. Examples 189 The fact that the NOTIFY envelope parameter is multivalued and the 190 notify envelope-part turns this into a list of values makes it easy 191 to check to see if a given value is present without having to worry 192 about other values: 194 require ["envelope", "envelope-dsn"]; 196 # Check whether SUCCESS notifications were requested, 197 # irrespective of any other requests that were made 198 if envelope "notify" "SUCCESS" 199 { 200 # do whatever 201 } 203 Checking to see if a given request is the only one present is a 204 little trickier, however: 206 require ["envelope", "envelope-dsn", "relational", 207 "comparator-i;ascii-numeric"]; 209 # Check whether only FAILURE notifications were requested 210 if allof ( envelope "notify" "FAILURE", 211 envelope :comparator "i;ascii-numeric" 212 :count "eq" "notify" "1" 213 ) 214 { 215 # do whatever 216 } 218 The orcpt envelope-part always contains an address type indicator 219 prefix in addition to an address, which must be taken into account in 220 any tests: 222 require ["envelope", "envelope-dsn"]; 224 # See if the orcpt is an RFC822 address in the example.com 225 # domain 226 if envelope :matches "orcpt" "rfc822;*@example.com" 227 { 228 # do whatever 229 } 231 5. Envelope-deliverby Extension 233 The "envelope-deliverby" extension does not define any new tests or 234 actions, rather, it adds three values to the list of possible (case- 235 insensitive) envelope-part strings defined in Section 5.4 of 236 [RFC5228]. These new envelope parts are defined in Section 5 of 237 [RFC2852]. 239 bytime - Match the initial integer part of the deliver-by 240 extension's BY parameter specified in the SMTP MAIL FROM command. 242 bymode - Match a string computed from the by-mode part of the 243 deliver-by extension's BY parameter. The possible values are 244 "notify" and "return", which correspond to the BY parameter mode 245 specifier characters "N" and "R" respectively. 247 bytrace - Match the trace modifier computed from the by-trace 248 modifier on the deliver-by extension's BY parameter. The possible 249 values are "trace" and "" (the empty string). These values 250 correspond to the presence or absence of the by-trace "T" modifier 251 respectively. 253 All of these tests fail unconditionally if the BY SMTP MAIL FROM 254 parameter does not exist for the current message or recipient. 256 The envelope test's ADDRESS-PART argument assumes the string being 257 tested has the syntax of an email address. None of the new envelope 258 parts defined here have address syntax, accordingly, it is an error 259 to specify an ADDRESS-PART argument in conjunction with these new 260 envelope parts. 262 The "relational" extension [RFC5231] adds a match type called 263 ":count". The count of an envelope test with an envelope-part of 264 "bytime", "bymode", and "bytrace" is 1 if the BY parameter is present 265 and 0 otherwise. 267 It should be noted that the deliver-by by-time is decremented as the 268 message passes through the transport infrastructure. Accordingly, it 269 is not possible to tell what the message originator set the value to, 270 only the amount of time remaining at the moment the sieve is run. 272 5.1. Example 274 As noted above, this extension does not provide access to the 275 originator's initial by-time setting for the simple reason that this 276 information is not part of the envelope. It can, however, be used to 277 check and see if the message was delivered within the alloted time. 279 require ["envelope", "envelope-deliverby", "relational", 280 "comparator-i;ascii-numeric"]; 282 # Check to see if this message didn't make it in the time alloted by 283 # the originator. 284 if envelope :value "eq" :comparator "i;ascii-numeric" "bytime" "0" 285 { 286 # do whatever 288 } 290 6. redirect-dsn extension 292 The "redirect-dsn" extension does not define any new tests or 293 actions, rather, it adds two new arguments, NOTIFY and RET, to the 294 redirect action defined in Section 4.2 of [RFC5228]. This updates 295 the usage description for redirect to: 296 [ 297 Usage: redirect [:notify "value"] [:ret "FULL"|"HDRS"] 298 300 The syntax for the NOTIFY and RET arguments are: 302 NOTIFY = ":notify" notify-value 303 notify-value = DQUOTE notify-esmtp-value DQUOTE 305 RET = ":ret" ret-value 306 ret-value = DQUOTE ("FULL" / "HDRS") DQUOTE 308 The notify-esmtp-value production is defined in Section 4.1 of 309 [RFC3461]. 311 When these arguments are specified, they set the corresponding NOTIFY 312 ESMTP RCPT TO and RET ESMTP MAIL FROM parameters, respectively. 313 These arguments are only honored if the delivery status notification 314 (DSN) ESMTP extension is available. When the DSN extension is not 315 available, these arguments MUST be ignored and MUST NOT cause an 316 error. 318 6.1. Example 320 One possible use of :notify on redirect is to combine the copy 321 extension [RFC3894] with the ability to suppress nondelivery 322 notifications to generate a private copy of selected messages with no 323 side effects or error notifications: 325 require ["copy", "redirect-dsn"]; 327 # Make a private copy of messages from user@example.com 328 if address "from" "user@example.com" 329 { 330 redirect :copy :notify "NEVER" "elsewhere@example.com"; 331 } 333 7. redirect-deliverby extension 335 The "redirect-deliverby" extension does not define any new tests or 336 actions, rather, it adds three new arguments, BYTIME, BYMODE, and 337 BYTRACE, to the redirect action defined in Section 4.2 of [RFC5228]. 338 This updates the usage description for redirect to: 339 [ 340 Usage: redirect [:bytime 341 [:bymode "notify"|"return"] [:bytrace]] 342 344 :bytime specifies the number of seconds within which the message 345 should be delivered. :bymode specifies whether a notification should 346 be sent or the message simply returned if the time limit is exceeded. 347 The default is "return" if :bymode is not specified. See The 348 semantics of delivery time limits are specified and discussed at 349 length in [RFC2852]. 351 It is an error to specify :bymode and :bytrace without :bytime. 353 When these arguments are specified, they are used to construct the 354 corresponding BY ESMTP MAIL FROM parameter. The :bytime value 355 becomes the by-time, the :bymode becomes the by-mode value, and 356 :bytrace sets the by-trace modifier. If the deliver-by extension is 357 unavailable, the handling of reredirected message MUST conform to the 358 semantics specified in [RFC2852] section 4.1.4 for relaying to a 359 server that does not support the deliver-by SMTP extension. 361 7.1. Example 363 The obvious use of "redirect-deliverby" is to specify a limit on 364 delivery attempts for a redirected message: 366 require ["copy", "redirect-deliverby"]; 368 # Send a copy to my cell phone, time out after 10 minutes 369 if address "from" "user@example.com" 370 { 371 redirect :copy :bytime 600 "cellphone@example.com"; 372 } 374 8. Security Considerations 376 The envelope-dsn and envelope-deliverby extensions provide access to 377 additional message envelope information. This is not believed to 378 raise any additional security issues beyond those for the Sieve 379 "envelope" test. 381 The redirect-dsn extension allows specification of the delivery 382 status notification's NOTIFY parameter which can cause the generation 383 of notification messages that might otherwise not be generated, 384 especially if notification in the event of successful delivery is 385 required. Sites which limit the ability to request success 386 notifications will also need to restrict the ability to request them 387 using the redirect-dsn extension. 389 Similarly, the redirect-deliverby extension is used to control how 390 long the transport infrastructure will continue to attempt to deliver 391 a message before giving up, which could result in the generation of 392 additional notification messages. While the underlying Deliver-By 393 extension does have a minimum by-time limit, sites may wish to impose 394 additional limits on the minimum by-time allowed in a redirect 395 action. 397 All of the security considerations given in the base Sieve 398 specification also apply to this extension. 400 9. IANA Considerations 402 The following template specifies the IANA registration of the Sieve 403 extension specified in this document: 405 To: iana@iana.org 406 Subject: Registration of new Sieve extensions 408 Capability name: envelope-dsn 409 Description: The "envelope-dsn" extension extends the envelope 410 test to allow checking of information associated 411 with the DSN ESMTP extension defined in RFC 3461. 412 RFC number: RFC XXXX 413 Contact address: Sieve discussion list 415 Capability name: envelope-deliverby 416 Description: The "envelope-deliverby" extension extends the 417 envelope test to allow checking of information 418 associated with the Deliver-By ESMTP extension 419 defined in RFC 2852. 420 RFC number: RFC XXXX 421 Contact address: Sieve discussion list 423 Capability name: redirect-dsn 424 Description: The "redirect-dsn" extension extends the redirect 425 action to allow specification of the NOTIFY and 426 RET ESMTP parameters associated with the DSN SMTP 427 extension defined in RFC 3461. 428 RFC number: RFC XXXX 429 Contact address: Sieve discussion list 431 Capability name: redirect-deliverby 432 Description: The "redirect-deliverby" extension extends the 433 redirect action to allow specification of the BY 434 ESMTP parameter associated with the Deliver-By SMTP 435 extension defined in RFC 2852. 436 RFC number: RFC XXXX 437 Contact address: Sieve discussion list 439 This information should be added to the list of sieve extensions 440 given on http://www.iana.org/assignments/sieve-extensions. 442 10. References 443 10.1. Normative references 445 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 446 Requirement Levels", BCP 14, RFC 2119, March 1997. 448 [RFC2852] Newman, D., "Deliver By SMTP Service Extension", RFC 2852, 449 June 2000. 451 [RFC3461] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service 452 Extension for Delivery Status Notifications (DSNs)", 453 RFC 3461, January 2003. 455 [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering 456 Language", RFC 5228, January 2008. 458 [RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering: 459 Relational Extension", RFC 5231, January 2008. 461 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 462 Specifications: ABNF", STD 68, RFC 5234, January 2008. 464 10.2. Informative references 466 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 467 4rev1", RFC 3501, March 2003. 469 [RFC3894] Degener, J., "Sieve Extension: Copying Without Side 470 Effects", RFC 3894, October 2004. 472 Appendix A. Acknowledgements 474 Cyrus Daboo, Derek Diget, Philip Guenther, Arnt Gulbrandsen, Andrew 475 McKeon, Alexey Melnikov, Chris Newman, Aaron Stone, and Alexandros 476 Vellis provided helpful suggestions and corrections. 478 Author's Address 480 Ned Freed 481 Sun Microsystems 482 800 Royal Oaks 483 Monrovia, CA 91016-6347 484 USA 486 Phone: +1 909 457 4293 487 Email: ned.freed@mrochek.com