idnits 2.17.1 draft-ietf-extra-sieve-mailboxid-00.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 (30 July 2020) is 1359 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) 30 July 2020 5 Intended status: Standards Track 6 Expires: 31 January 2021 8 Sieve Email Filtering: delivery by mailboxid 9 draft-ietf-extra-sieve-mailboxid-00 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 31 January 2021. 37 Copyright Notice 39 Copyright (c) 2020 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 4.3. Interaction with "fcc" extension . . . . . . . . . . . . 5 60 5. Test ":mailboxidexists" . . . . . . . . . . . . . . . . . . . 5 61 6. Interaction with variables extension . . . . . . . . . . . . 6 62 7. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 6 63 8. Security considerations . . . . . . . . . . . . . . . . . . . 6 64 9. IANA considerations . . . . . . . . . . . . . . . . . . . . . 7 65 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 66 11. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 67 11.1. draft-ietf-sieve-mailboxid-00 . . . . . . . . . . . . . 7 68 11.2. draft-gondwana-sieve-mailboxid-02 . . . . . . . . . . . 7 69 11.3. draft-gondwana-sieve-mailboxid-01 . . . . . . . . . . . 8 70 11.4. draft-gondwana-sieve-mailboxid-00 . . . . . . . . . . . 8 71 12. Normative References . . . . . . . . . . . . . . . . . . . . 8 72 13. Informative References . . . . . . . . . . . . . . . . . . . 9 73 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 75 1. Introduction 77 Sieve rules are sometimes created using graphical interfaces which 78 allow users to select the mailbox to be used as a target for a rule. 79 If that mailbox is renamed, the client may also update its internal 80 representation of the rule and update the sieve script to match, 81 however this is a multi-step process and subject to partial failures. 82 Also, if the folder is renamed by a different mechanism (e.g. another 83 IMAP client) the rules will get out of sync. 85 By extending "fileinto" to reference an immutable mailboxid, sieve 86 rules can continue to target the same mailbox, even if it gets 87 renamed. 89 2. Conventions Used In This Document 91 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 92 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 93 "OPTIONAL" in this document are to be interpreted as described in BCP 94 14 [RFC2119] [RFC8174] when, and only when, they appear in all 95 capitals, as shown here. 97 3. Sieve capability string 99 The server advertises the capability "mailboxid", and scripts which 100 use the following extensions MUST explicitly request the capability 101 "mailboxid". 103 Example: 105 require "mailboxid"; 107 4. Argument ":mailboxid" to Command "fileinto" 109 Normally, the "fileinto" command delivers the message in the mailbox 110 specified using its positional mailbox argument. However, if the 111 optional ":mailboxid" argument is also specified, the "fileinto" 112 command first checks whether a mailbox exists in the user's personal 113 namespace [RFC2342] with the specified [RFC8474] MAILBOXID. 115 If a matching mailbox is found, that mailbox is used for delivery. 117 If there is no such mailbox, the "fileinto" action proceeds as it 118 would without the ":mailboxid" argument. 120 The tagged argument ":mailboxid" to fileinto consumes one additional 121 token, a string with the objectid of the mailbox to file into. 123 Example: 125 require "fileinto"; 126 require "mailboxid"; 128 if header :contains ["from"] "coyote" { 129 fileinto :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 130 "INBOX.harassment"; 131 } 133 4.1. Interaction with "mailbox" extension 135 For servers which also support the [RFC5490] mailbox extension, the 136 ":create" modifier to fileinto does not create the mailbox with the 137 specified mailboxid, however it may be specified and interacts as 138 normal with all other extensions. 140 Example: 142 require "fileinto"; 143 require "mailboxid"; 144 require "mailbox"; 146 fileinto :mailboxid "Fnosuch" 147 :create 148 "INBOX.no-such-folder"; 149 # creates INBOX.no-such-folder, but it doesn't 150 # get the "Fnosuch" mailboxid. 152 4.2. Interaction with "specialuse" extension 154 For servers which also support [RFC8579] delivery to special-use 155 mailboxes, if a fileinto command has both ":mailboxid" and ":special- 156 use" specified, then the mailboxid is resolved first. 158 If a mailbox with the specified mailboxid does not exist, then the 159 process specified in [RFC8579] is followed - which includes 160 processing of [RFC5490] ":create" tags to add the special-use to the 161 created mailbox. 163 Example: 165 require "fileinto"; 166 require "mailboxid"; 167 require "special-use"; 168 if header :contains ["from"] "coyote" { 169 fileinto :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 170 :specialuse "\\Junk" 171 "INBOX.harassment"; 172 } 174 Example: 176 require "fileinto"; 177 require "mailboxid"; 178 require "mailbox"; 179 require "special-use"; 181 fileinto :mailboxid "F1234567" 182 :specialuse "\\Archive" 183 :create 184 "INBOX.Archive"; 185 # creates INBOX.Archive with use \Archive but 186 # with a different mailboxid. 188 4.3. Interaction with "fcc" extension 190 This document extends the definition of the ":fcc" argument defined 191 in [RFC8580] so that it can optionally be used with the ":mailboxid" 192 argument. 194 FCC =/ [":mailboxid" ] 196 If the optional ":mailboxid" argument is specified with ":fcc", it 197 instructs the Sieve interpreter to check whether a mailbox exists 198 with the specific mailboxid. If such a mailbox exists, the generated 199 message is filed into that mailbox. Otherwise, the generated message 200 is filed into the ":fcc" target mailbox. 202 Example: 204 require ["enotify", "fcc", "mailboxid"]; 205 notify :fcc "INBOX.Sent" 206 :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 207 :message "You got mail!" 208 "mailto:ken@example.com"; 210 5. Test ":mailboxidexists" 212 The "mailboxidexists" test is true if all mailboxes listed in the 213 "mailboxids" argument exist in the mailstore, and each allows the 214 user in whose context the Sieve script runs to "deliver" messages 215 into it. When the mailstore is an IMAP server, "delivery" of 216 messages is possible if: 218 a) the READ-WRITE response code is present for the mailbox (see 219 Section 7.1 of [RFC3501]), if IMAP Access Control List (ACL) 220 [RFC4314] is not supported by the server, or 222 b) the user has 'p' or 'i' rights for the mailbox (see Section 5.2 of 223 [RFC4314]). 225 Note that a successful "mailboxidexists" test for a mailbox doesn't 226 necessarily mean that a "fileinto :mailboxid" action on this mailbox 227 would succeed. For example, the "fileinto" action might put user 228 over quota. The "mailboxidexists" test only verifies existence of 229 the mailbox and whether the user in whose context the Sieve script 230 runs has permissions to execute "fileinto" on it. 232 Example: 234 require "fileinto"; 235 require "mailboxid"; 237 if header :contains ["from"] "coyote" { 238 if mailboxidexists "F6352ae03-b7f5-463c-896f-d8b48ee3" { 239 fileinto :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 240 "INBOX.harassment"; 241 } else { 242 fileinto "INBOX.harassment"; 243 } 244 } 246 Note to implementers: this test behaves identically to the 247 "mailboxexists" test defined in [RFC5490] but operates on mailboxids 248 rather than mailbox names. 250 6. Interaction with variables extension 252 There is no special interaction defined, however as an objectid is a 253 string in this document, objectid values can contain variable 254 expansions if [RFC5229] is enabled. 256 7. Formal Syntax 258 test /= "mailboxidexists" string-list 260 tag /= ":mailboxid" string 262 If [I-D.ietf-extra-sieve-fcc] is supported: 264 FCC =/ [":mailboxid" ] 266 8. Security considerations 268 Because mailboxid is always generated by the server, implementations 269 MUST NOT allow sieve to make an endrun around this protection by 270 creating mailboxes with the specified ID by using ":create" and 271 ":mailboxid" in a fileinto rule for a non-existant mailbox. 273 Implementers are referred to the security considerations sections of 274 [RFC5228] and [RFC8474]. 276 9. IANA considerations 278 IANA are requested to add a capability to the sieve-extensions 279 registry: 281 To: iana@iana.org 282 Subject: Registration of new Sieve extension 284 Capability name: mailboxid 285 Description: adds a test for checking mailbox existence by objectid, 286 and new optional arguments to fileinto and :fcc which 287 allow selecting the destination mailbox by objectid. 288 RFC number: this RFC 289 Contact address: The EXTRA discussion list 291 10. Acknowledgements 293 This document borrows heavily from [RFC5490] for the matching 294 mailboxexists test, and from [I-D.ietf-extra-sieve-special-use] for 295 an example of modifying the fileinto command. 297 Thanks to Ned Freed and Ken Murchison and Alexey Melnikov for 298 feedback on the EXTRA mailing list. 300 11. Changes 302 (EDITOR: remove this section before publication) 304 11.1. draft-ietf-sieve-mailboxid-00 306 * Adopted into working group per adoption call on list 308 * Updated references to old drafts which have since been published. 310 * Fixed some typoes and simplified some language. 312 * Removed stray leading colon on mailboxexists (thanks Alexey) 314 * Added :fcc to the IANA registration description (thanks Alexey) 316 * Mentioned that variables can be expanded (thanks Alexey) 318 11.2. draft-gondwana-sieve-mailboxid-02 319 * Update document date by a couple of years! Ooops, it got 320 forgotten after a WGLC which got not dissent. 322 * Create xml2rfc v3 output. 324 11.3. draft-gondwana-sieve-mailboxid-01 326 * Switch to :mailboxid tagged parameter value with fallback mailbox 327 name. 329 * Document interaction with "mailbox". 331 * Document interaction with "special-use". 333 * Document interaction with "fcc". 335 * Document security considerations around :mailboxid and :create. 337 11.4. draft-gondwana-sieve-mailboxid-00 339 * Initial version. 341 12. Normative References 343 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 344 Requirement Levels", BCP 14, RFC 2119, 345 DOI 10.17487/RFC2119, March 1997, 346 . 348 [RFC5228] Guenther, P., Ed. and T. Showalter, Ed., "Sieve: An Email 349 Filtering Language", RFC 5228, DOI 10.17487/RFC5228, 350 January 2008, . 352 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 353 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 354 May 2017, . 356 [RFC2342] Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342, 357 DOI 10.17487/RFC2342, May 1998, 358 . 360 [RFC8474] Gondwana, B., Ed., "IMAP Extension for Object 361 Identifiers", RFC 8474, DOI 10.17487/RFC8474, September 362 2018, . 364 [RFC8580] Murchison, K. and B. Gondwana, "Sieve Extension: File 365 Carbon Copy (FCC)", RFC 8580, DOI 10.17487/RFC8580, May 366 2019, . 368 13. Informative References 370 [RFC5490] Melnikov, A., "The Sieve Mail-Filtering Language -- 371 Extensions for Checking Mailbox Status and Accessing 372 Mailbox Metadata", RFC 5490, DOI 10.17487/RFC5490, March 373 2009, . 375 [I-D.ietf-extra-sieve-special-use] 376 Bosch, S., "Sieve Email Filtering: Delivering to Special- 377 Use Mailboxes", Work in Progress, Internet-Draft, draft- 378 ietf-extra-sieve-special-use-05, 24 January 2019, 379 . 382 [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", 383 RFC 5229, DOI 10.17487/RFC5229, January 2008, 384 . 386 [RFC8579] Bosch, S., "Sieve Email Filtering: Delivering to Special- 387 Use Mailboxes", RFC 8579, DOI 10.17487/RFC8579, May 2019, 388 . 390 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 391 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 392 . 394 [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension", 395 RFC 4314, DOI 10.17487/RFC4314, December 2005, 396 . 398 [I-D.ietf-extra-sieve-fcc] 399 Murchison, K. and B. Gondwana, "Sieve Extension: File 400 Carbon Copy (Fcc)", Work in Progress, Internet-Draft, 401 draft-ietf-extra-sieve-fcc-09, 13 January 2019, 402 . 405 Author's Address 407 Bron Gondwana (editor) 408 Fastmail 409 Level 2, 114 William St 410 Melbourne VIC 3000 411 Australia 413 Email: brong@fastmailteam.com 414 URI: https://www.fastmail.com