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