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