idnits 2.17.1 draft-ietf-extra-sieve-mailboxid-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC5228, but the abstract doesn't seem to directly say this. It does mention RFC5228 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC5228, updated by this document, for RFC5378 checks: 2005-05-09) -- 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 (16 March 2021) is 1108 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: 0 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 EXTRA B. Gondwana, Ed. 3 Internet-Draft Fastmail 4 Updates: 5228 (if approved) 16 March 2021 5 Intended status: Standards Track 6 Expires: 17 September 2021 8 Sieve Email Filtering: delivery by mailboxid 9 draft-ietf-extra-sieve-mailboxid-09 11 Abstract 13 The OBJECTID capability of the IMAP protocol (RFC8474) allows clients 14 to identify mailboxes by a unique identifier which survives rename. 16 This document extends the Sieve mail filtering language (RFC5228) to 17 allow using that same unique identifier as a target for fileinto 18 rules, and for testing the existance of mailboxes. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on 17 September 2021. 37 Copyright Notice 39 Copyright (c) 2021 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 44 license-info) in effect on the date of publication of this document. 45 Please review these documents carefully, as they describe your rights 46 and restrictions with respect to this document. Code Components 47 extracted from this document must include Simplified BSD License text 48 as described in Section 4.e of the Trust Legal Provisions and are 49 provided without warranty as described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. Conventions Used In This Document . . . . . . . . . . . . . . 3 55 3. Sieve capability string . . . . . . . . . . . . . . . . . . . 3 56 4. Argument ":mailboxid" to Command "fileinto" . . . . . . . . . 3 57 4.1. Interaction with "mailbox" extension . . . . . . . . . . 4 58 4.2. Interaction with "specialuse" extension . . . . . . . . . 4 59 5. Interaction with "fcc" extension . . . . . . . . . . . . . . 5 60 6. Test "mailboxidexists" . . . . . . . . . . . . . . . . . . . 5 61 7. Interaction with variables extension . . . . . . . . . . . . 6 62 8. Security considerations . . . . . . . . . . . . . . . . . . . 6 63 9. IANA considerations . . . . . . . . . . . . . . . . . . . . . 6 64 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 65 11. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 66 11.1. draft-ietf-sieve-mailboxid-09 . . . . . . . . . . . . . 7 67 11.2. draft-ietf-sieve-mailboxid-08 . . . . . . . . . . . . . 7 68 11.3. draft-ietf-sieve-mailboxid-07 . . . . . . . . . . . . . 7 69 11.4. draft-ietf-sieve-mailboxid-06 . . . . . . . . . . . . . 8 70 11.5. draft-ietf-sieve-mailboxid-05 . . . . . . . . . . . . . 8 71 11.6. draft-ietf-sieve-mailboxid-04 . . . . . . . . . . . . . 8 72 11.7. draft-ietf-sieve-mailboxid-03 . . . . . . . . . . . . . 8 73 11.8. draft-ietf-sieve-mailboxid-02 . . . . . . . . . . . . . 8 74 11.9. draft-ietf-sieve-mailboxid-01 . . . . . . . . . . . . . 8 75 11.10. draft-ietf-sieve-mailboxid-00 . . . . . . . . . . . . . 8 76 11.11. draft-gondwana-sieve-mailboxid-02 . . . . . . . . . . . 9 77 11.12. draft-gondwana-sieve-mailboxid-01 . . . . . . . . . . . 9 78 11.13. draft-gondwana-sieve-mailboxid-00 . . . . . . . . . . . 9 79 12. Normative References . . . . . . . . . . . . . . . . . . . . 9 80 13. Informative References . . . . . . . . . . . . . . . . . . . 10 81 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 83 1. Introduction 85 [RFC5228] Sieve rules are sometimes created using graphical 86 interfaces which allow users to select the mailbox to be used as a 87 target for a rule. 89 If that mailbox is renamed, the client may also update its internal 90 representation of the rule and update the sieve script to match, 91 however this is a multi-step process and subject to partial failures. 92 Also, if the folder is renamed by a different mechanism (e.g. another 93 IMAP client) the rules will get out of sync. 95 By telling "fileinto" to reference the immutable mailboxid specified 96 by [RFC8474], using the extension specified herein, sieve rules can 97 continue to target the same mailbox even if it gets renamed. 99 2. Conventions Used In This Document 101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 103 "OPTIONAL" in this document are to be interpreted as described in BCP 104 14 [RFC2119] [RFC8174] when, and only when, they appear in all 105 capitals, as shown here. 107 3. Sieve capability string 109 Scripts which use the following extensions MUST explicitly require 110 the capability "mailboxid". 112 Example: 114 require "mailboxid"; 116 4. Argument ":mailboxid" to Command "fileinto" 118 Normally, the "fileinto" command delivers the message in the mailbox 119 specified using its positional mailbox argument. However, if the 120 optional ":mailboxid" argument is also specified, the "fileinto" 121 command first checks whether a mailbox exists in the user's personal 122 namespace [RFC2342] with the specified [RFC8474] MAILBOXID. 124 If a matching mailbox is found, that mailbox is used for delivery. 126 If there is no such mailbox, the "fileinto" action proceeds as it 127 would without the ":mailboxid" argument. 129 The tagged argument ":mailboxid" to fileinto consumes one additional 130 token, a string with the objectid of the mailbox to file into. 132 Example: 134 require "fileinto"; 135 require "mailboxid"; 137 if header :contains ["from"] "coyote" { 138 fileinto :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 139 "INBOX.harassment"; 140 } 142 4.1. Interaction with "mailbox" extension 144 For servers which also support the [RFC5490] mailbox extension, if 145 both the ":create" and ":mailboxid" arguments are provided to a 146 "fileinto" command and no matching mailbox is found, then a new 147 mailbox will be created. 149 This new mailbox will have the name specified by the positional 150 mailbox argument ([RFC5228] section 4.1), however it will get a 151 different mailboxid (chosen by the server) rather than the one 152 specified by the ":mailboxid" argument to fileinto. 154 Example: 156 require "fileinto"; 157 require "mailboxid"; 158 require "mailbox"; 160 fileinto :mailboxid "Fnosuch" 161 :create 162 "INBOX.no-such-folder"; 163 # creates INBOX.no-such-folder, but it doesn't 164 # get the "Fnosuch" mailboxid. 166 4.2. Interaction with "specialuse" extension 168 For servers which also support [RFC8579] delivery to special-use 169 mailboxes, it is an error to specify both ":mailboxid" and 170 ":specialuse" in the same fileinto command. 172 Advanced filtering based on both special-use and mailboxid can be 173 built with explicit "specialuse_exists" and "mailboxidexists" tests. 175 Note to developers of sieve generation tools: it is advisable to use 176 special-use rather than mailboxid when creating rules that are based 177 on a special-use purpose (e.g. delivery directly to the Junk folder 178 based on a header that was added by a scanning agent earlier in the 179 mailflow). 181 5. Interaction with "fcc" extension 183 This document extends the definition of the ":fcc" argument defined 184 in [RFC8580] so that it can optionally be used with the ":mailboxid" 185 argument. The syntax for "FCC" is extended here using ABNF 186 [RFC5234]: 188 MAILBOXID-OPT = ":mailboxid" objectid 190 FCC-OPTS =/ MAILBOXID-OPT 192 If the optional ":mailboxid" argument is specified with ":fcc", it 193 instructs the Sieve interpreter to check whether a mailbox exists 194 with the specific mailboxid. If such a mailbox exists, the generated 195 message is filed into that mailbox. Otherwise, the generated message 196 is filed into the ":fcc" target mailbox. 198 As with fileinto, it is an error to specify both ":mailboxid" and 199 ":specialuse" for the same fcc rule. 201 Example: 203 require ["enotify", "fcc", "mailboxid"]; 204 notify :fcc "INBOX.Sent" 205 :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 206 :message "You got mail!" 207 "mailto:ken@example.com"; 209 6. Test "mailboxidexists" 211 The "mailboxidexists" test is true if all mailboxes listed in the 212 "mailboxids" argument exist in the mailstore, and each allows the 213 user in whose context the Sieve script runs to "deliver" messages 214 into it. When the mailstore is an IMAP server, "delivery" of 215 messages is possible if: 217 a) the READ-WRITE response code is present for the mailbox (see 218 Section 7.1 of [RFC3501]), if IMAP Access Control List (ACL) 219 [RFC4314] is not supported by the server, or 221 b) the user has 'p' or 'i' rights for the mailbox (see Section 5.2 of 222 [RFC4314]). 224 Note that a successful "mailboxidexists" test for a mailbox doesn't 225 necessarily mean that a "fileinto :mailboxid" action on this mailbox 226 would succeed. For example, the "fileinto" action might put user 227 over quota. The "mailboxidexists" test only verifies existence of 228 the mailbox and whether the user in whose context the Sieve script 229 runs has permissions to execute "fileinto" on it. 231 Example: 233 require "fileinto"; 234 require "mailboxid"; 236 if header :contains ["from"] "coyote" { 237 if mailboxidexists "F6352ae03-b7f5-463c-896f-d8b48ee3" { 238 fileinto :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 239 "INBOX.name.will.not.be.used"; 240 } else { 241 fileinto "INBOX.harassment"; 242 } 243 } 245 Note to implementers: this test behaves identically to the 246 "mailboxexists" test defined in [RFC5490] but operates on mailboxids 247 rather than mailbox names. 249 7. Interaction with variables extension 251 There is no special interaction defined, however as an objectid is a 252 string in this document, objectid values can contain variable 253 expansions if [RFC5229] is enabled. 255 8. Security considerations 257 Because mailboxid is always generated by the server, implementations 258 MUST NOT allow sieve to make an endrun around this protection by 259 creating mailboxes with the specified ID by using ":create" and 260 ":mailboxid" in a fileinto rule for a non-existant mailbox. 262 Implementers are referred to the security considerations sections of 263 [RFC5228] and [RFC8474]. 265 9. IANA considerations 267 IANA are requested to add a capability to the sieve-extensions 268 registry: 270 To: iana@iana.org 271 Subject: Registration of new Sieve extension 273 Capability name: mailboxid 274 Description: adds a test for checking mailbox existence by objectid, 275 and new optional arguments to fileinto and :fcc which 276 allow selecting the destination mailbox by objectid. 277 RFC number: this RFC 278 Contact address: The EXTRA discussion list 280 10. Acknowledgements 282 This document borrows heavily from [RFC5490] for the matching 283 mailboxexists test, and from [RFC8579] for an example of modifying 284 the fileinto command. 286 Thanks to Ned Freed and Ken Murchison and Alexey Melnikov for 287 feedback on the EXTRA mailing list. 289 11. Changes 291 (EDITOR: remove this section before publication) 293 11.1. draft-ietf-sieve-mailboxid-09 295 * update FCC-OPTS to have an intermediate production for the 296 :mailboxid option, and reference "objectid" from RFC8474 as the 297 valid format for the option value. 299 11.2. draft-ietf-sieve-mailboxid-08 301 * IETF110 discussion - re-add FCC-OPTS syntax, and clarify that 302 :mailboxid is incompatible with :specialuse to parallel the 303 fileinto behaviour 305 11.3. draft-ietf-sieve-mailboxid-07 307 * Martin Duke review - remove formal section 309 * Martin Duke review - wording for section 4.1 (interaction with 310 :create) 312 * Ken Murchison review - fixed :special-use to :specialuse per 313 RFC8579 315 11.4. draft-ietf-sieve-mailboxid-06 317 * GENART review - fixed example to not be semantically pointless 319 * GENART review - fixed !@ to @! in RFC reference mmark syntax 321 11.5. draft-ietf-sieve-mailboxid-05 323 * disallow :mailboxid and :special-use in the same fileinto action. 325 11.6. draft-ietf-sieve-mailboxid-04 327 * made RFC5490 and RFC8579 normative 329 * clarified wording based on AD feedback from Barry 331 11.7. draft-ietf-sieve-mailboxid-03 333 * Fixed ABNF syntax error 335 11.8. draft-ietf-sieve-mailboxid-02 337 * removed bogus : from "mailboxidexists" test title 339 * moved FCC to its own top-level section since it is not used with 340 the fileinto command. 342 11.9. draft-ietf-sieve-mailboxid-01 344 * fixed idnits - RFC5228 not mentioned in the abstract 346 * fixed other I-D references I had missed, oops 348 11.10. draft-ietf-sieve-mailboxid-00 350 * Adopted into working group per adoption call on list 352 * Updated references to old drafts which have since been published. 354 * Fixed some typoes and simplified some language. 356 * Removed stray leading colon on mailboxexists (thanks Alexey) 358 * Added :fcc to the IANA registration description (thanks Alexey) 360 * Mentioned that variables can be expanded (thanks Alexey) 362 11.11. draft-gondwana-sieve-mailboxid-02 364 * Update document date by a couple of years! Ooops, it got 365 forgotten after a WGLC which got not dissent. 367 * Create xml2rfc v3 output. 369 11.12. draft-gondwana-sieve-mailboxid-01 371 * Switch to :mailboxid tagged parameter value with fallback mailbox 372 name. 374 * Document interaction with "mailbox". 376 * Document interaction with "special-use". 378 * Document interaction with "fcc". 380 * Document security considerations around :mailboxid and :create. 382 11.13. draft-gondwana-sieve-mailboxid-00 384 * Initial version. 386 12. Normative References 388 [RFC5228] Guenther, P., Ed. and T. Showalter, Ed., "Sieve: An Email 389 Filtering Language", RFC 5228, DOI 10.17487/RFC5228, 390 January 2008, . 392 [RFC8474] Gondwana, B., Ed., "IMAP Extension for Object 393 Identifiers", RFC 8474, DOI 10.17487/RFC8474, September 394 2018, . 396 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 397 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 398 May 2017, . 400 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 401 Specifications: ABNF", STD 68, RFC 5234, 402 DOI 10.17487/RFC5234, January 2008, 403 . 405 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 406 Requirement Levels", BCP 14, RFC 2119, 407 DOI 10.17487/RFC2119, March 1997, 408 . 410 [RFC2342] Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342, 411 DOI 10.17487/RFC2342, May 1998, 412 . 414 [RFC8580] Murchison, K. and B. Gondwana, "Sieve Extension: File 415 Carbon Copy (FCC)", RFC 8580, DOI 10.17487/RFC8580, May 416 2019, . 418 13. Informative References 420 [RFC8579] Bosch, S., "Sieve Email Filtering: Delivering to Special- 421 Use Mailboxes", RFC 8579, DOI 10.17487/RFC8579, May 2019, 422 . 424 [RFC5490] Melnikov, A., "The Sieve Mail-Filtering Language -- 425 Extensions for Checking Mailbox Status and Accessing 426 Mailbox Metadata", RFC 5490, DOI 10.17487/RFC5490, March 427 2009, . 429 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 430 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 431 . 433 [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension", 434 RFC 4314, DOI 10.17487/RFC4314, December 2005, 435 . 437 [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", 438 RFC 5229, DOI 10.17487/RFC5229, January 2008, 439 . 441 Author's Address 443 Bron Gondwana (editor) 444 Fastmail 445 Level 2, 114 William St 446 Melbourne VIC 3000 447 Australia 449 Email: brong@fastmailteam.com 450 URI: https://www.fastmail.com