idnits 2.17.1 draft-ietf-extra-sieve-mailboxid-05.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 (19 November 2020) is 1253 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) 19 November 2020 5 Intended status: Standards Track 6 Expires: 23 May 2021 8 Sieve Email Filtering: delivery by mailboxid 9 draft-ietf-extra-sieve-mailboxid-05 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 23 May 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 5. Interaction with "fcc" extension . . . . . . . . . . . . . . 4 60 6. Test "mailboxidexists" . . . . . . . . . . . . . . . . . . . 5 61 7. Interaction with variables extension . . . . . . . . . . . . 6 62 8. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 6 63 9. Security considerations . . . . . . . . . . . . . . . . . . . 6 64 10. IANA considerations . . . . . . . . . . . . . . . . . . . . . 6 65 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 66 12. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 67 12.1. draft-ietf-sieve-mailboxid-05 . . . . . . . . . . . . . 7 68 12.2. draft-ietf-sieve-mailboxid-04 . . . . . . . . . . . . . 7 69 12.3. draft-ietf-sieve-mailboxid-03 . . . . . . . . . . . . . 7 70 12.4. draft-ietf-sieve-mailboxid-02 . . . . . . . . . . . . . 7 71 12.5. draft-ietf-sieve-mailboxid-01 . . . . . . . . . . . . . 7 72 12.6. draft-ietf-sieve-mailboxid-00 . . . . . . . . . . . . . 8 73 12.7. draft-gondwana-sieve-mailboxid-02 . . . . . . . . . . . 8 74 12.8. draft-gondwana-sieve-mailboxid-01 . . . . . . . . . . . 8 75 12.9. draft-gondwana-sieve-mailboxid-00 . . . . . . . . . . . 8 76 13. Normative References . . . . . . . . . . . . . . . . . . . . 8 77 14. Informative References . . . . . . . . . . . . . . . . . . . 9 78 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 80 1. Introduction 82 [RFC5228] Sieve rules are sometimes created using graphical 83 interfaces which allow users to select the mailbox to be used as a 84 target for a rule. 86 If that mailbox is renamed, the client may also update its internal 87 representation of the rule and update the sieve script to match, 88 however this is a multi-step process and subject to partial failures. 89 Also, if the folder is renamed by a different mechanism (e.g. another 90 IMAP client) the rules will get out of sync. 92 By telling "fileinto" to reference the immutable mailboxid specified 93 by [RFC8474], using the extension specified herein, sieve rules can 94 continue to target the same mailbox even if it gets renamed. 96 2. Conventions Used In This Document 98 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 99 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 100 "OPTIONAL" in this document are to be interpreted as described in BCP 101 14 [RFC2119] [RFC8174] when, and only when, they appear in all 102 capitals, as shown here. 104 3. Sieve capability string 106 Scripts which use the following extensions MUST explicitly require 107 the capability "mailboxid". 109 Example: 111 require "mailboxid"; 113 4. Argument ":mailboxid" to Command "fileinto" 115 Normally, the "fileinto" command delivers the message in the mailbox 116 specified using its positional mailbox argument. However, if the 117 optional ":mailboxid" argument is also specified, the "fileinto" 118 command first checks whether a mailbox exists in the user's personal 119 namespace [RFC2342] with the specified [RFC8474] MAILBOXID. 121 If a matching mailbox is found, that mailbox is used for delivery. 123 If there is no such mailbox, the "fileinto" action proceeds as it 124 would without the ":mailboxid" argument. 126 The tagged argument ":mailboxid" to fileinto consumes one additional 127 token, a string with the objectid of the mailbox to file into. 129 Example: 131 require "fileinto"; 132 require "mailboxid"; 134 if header :contains ["from"] "coyote" { 135 fileinto :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 136 "INBOX.harassment"; 137 } 139 4.1. Interaction with "mailbox" extension 141 For servers which also support the [!@RFC5490] mailbox extension, the 142 ":create" modifier to fileinto does not create the mailbox with the 143 specified mailboxid, however it may be specified and interacts as 144 normal with all other extensions. 146 Example: 148 require "fileinto"; 149 require "mailboxid"; 150 require "mailbox"; 152 fileinto :mailboxid "Fnosuch" 153 :create 154 "INBOX.no-such-folder"; 155 # creates INBOX.no-such-folder, but it doesn't 156 # get the "Fnosuch" mailboxid. 158 4.2. Interaction with "specialuse" extension 160 For servers which also support [!@RFC8579] delivery to special-use 161 mailboxes, it is an error to specify both ":mailboxid" and ":special- 162 use" in the same fileinto command. 164 Advanced filtering based on both special-use and mailboxid can be 165 built with explicit "specialuse_exists" and "mailboxidexists" tests. 167 Note to developers of sieve generation tools: it is advisable to use 168 special-use rather than mailboxid when creating rules that are based 169 on a special-use purpose (e.g. delivery directly to the Junk folder 170 based on a header that was added by a scanning agent earlier in the 171 mailflow). 173 5. Interaction with "fcc" extension 175 This document extends the definition of the ":fcc" argument defined 176 in [RFC8580] so that it can optionally be used with the ":mailboxid" 177 argument. 179 FCC =/ [":mailboxid" ] 181 If the optional ":mailboxid" argument is specified with ":fcc", it 182 instructs the Sieve interpreter to check whether a mailbox exists 183 with the specific mailboxid. If such a mailbox exists, the generated 184 message is filed into that mailbox. Otherwise, the generated message 185 is filed into the ":fcc" target mailbox. 187 Example: 189 require ["enotify", "fcc", "mailboxid"]; 190 notify :fcc "INBOX.Sent" 191 :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 192 :message "You got mail!" 193 "mailto:ken@example.com"; 195 6. Test "mailboxidexists" 197 The "mailboxidexists" test is true if all mailboxes listed in the 198 "mailboxids" argument exist in the mailstore, and each allows the 199 user in whose context the Sieve script runs to "deliver" messages 200 into it. When the mailstore is an IMAP server, "delivery" of 201 messages is possible if: 203 a) the READ-WRITE response code is present for the mailbox (see 204 Section 7.1 of [RFC3501]), if IMAP Access Control List (ACL) 205 [RFC4314] is not supported by the server, or 207 b) the user has 'p' or 'i' rights for the mailbox (see Section 5.2 of 208 [RFC4314]). 210 Note that a successful "mailboxidexists" test for a mailbox doesn't 211 necessarily mean that a "fileinto :mailboxid" action on this mailbox 212 would succeed. For example, the "fileinto" action might put user 213 over quota. The "mailboxidexists" test only verifies existence of 214 the mailbox and whether the user in whose context the Sieve script 215 runs has permissions to execute "fileinto" on it. 217 Example: 219 require "fileinto"; 220 require "mailboxid"; 222 if header :contains ["from"] "coyote" { 223 if mailboxidexists "F6352ae03-b7f5-463c-896f-d8b48ee3" { 224 fileinto :mailboxid "F6352ae03-b7f5-463c-896f-d8b48ee3" 225 "INBOX.harassment"; 226 } else { 227 fileinto "INBOX.harassment"; 228 } 229 } 231 Note to implementers: this test behaves identically to the 232 "mailboxexists" test defined in [RFC5490] but operates on mailboxids 233 rather than mailbox names. 235 7. Interaction with variables extension 237 There is no special interaction defined, however as an objectid is a 238 string in this document, objectid values can contain variable 239 expansions if [RFC5229] is enabled. 241 8. Formal Syntax 243 test =/ "mailboxidexists" string-list 245 tag =/ ":mailboxid" string 247 FCC =/ [":mailboxid" ] 248 ; if [@RFC8580] is supported 250 9. Security considerations 252 Because mailboxid is always generated by the server, implementations 253 MUST NOT allow sieve to make an endrun around this protection by 254 creating mailboxes with the specified ID by using ":create" and 255 ":mailboxid" in a fileinto rule for a non-existant mailbox. 257 Implementers are referred to the security considerations sections of 258 [RFC5228] and [RFC8474]. 260 10. IANA considerations 262 IANA are requested to add a capability to the sieve-extensions 263 registry: 265 To: iana@iana.org 266 Subject: Registration of new Sieve extension 268 Capability name: mailboxid 269 Description: adds a test for checking mailbox existence by objectid, 270 and new optional arguments to fileinto and :fcc which 271 allow selecting the destination mailbox by objectid. 272 RFC number: this RFC 273 Contact address: The EXTRA discussion list 275 11. Acknowledgements 277 This document borrows heavily from [RFC5490] for the matching 278 mailboxexists test, and from [RFC8579] for an example of modifying 279 the fileinto command. 281 Thanks to Ned Freed and Ken Murchison and Alexey Melnikov for 282 feedback on the EXTRA mailing list. 284 12. Changes 286 (EDITOR: remove this section before publication) 288 12.1. draft-ietf-sieve-mailboxid-05 290 * disallow :mailboxid and :special-use in the same fileinto action. 292 12.2. draft-ietf-sieve-mailboxid-04 294 * made RFC5490 and RFC8579 normative 296 * clarified wording based on AD feedback from Barry 298 12.3. draft-ietf-sieve-mailboxid-03 300 * Fixed ABNF syntax error 302 12.4. draft-ietf-sieve-mailboxid-02 304 * removed bogus : from "mailboxidexists" test title 306 * moved FCC to its own top-level section since it is not used with 307 the fileinto command. 309 12.5. draft-ietf-sieve-mailboxid-01 311 * fixed idnits - RFC5228 not mentioned in the abstract 312 * fixed other I-D references I had missed, oops 314 12.6. draft-ietf-sieve-mailboxid-00 316 * Adopted into working group per adoption call on list 318 * Updated references to old drafts which have since been published. 320 * Fixed some typoes and simplified some language. 322 * Removed stray leading colon on mailboxexists (thanks Alexey) 324 * Added :fcc to the IANA registration description (thanks Alexey) 326 * Mentioned that variables can be expanded (thanks Alexey) 328 12.7. draft-gondwana-sieve-mailboxid-02 330 * Update document date by a couple of years! Ooops, it got 331 forgotten after a WGLC which got not dissent. 333 * Create xml2rfc v3 output. 335 12.8. draft-gondwana-sieve-mailboxid-01 337 * Switch to :mailboxid tagged parameter value with fallback mailbox 338 name. 340 * Document interaction with "mailbox". 342 * Document interaction with "special-use". 344 * Document interaction with "fcc". 346 * Document security considerations around :mailboxid and :create. 348 12.9. draft-gondwana-sieve-mailboxid-00 350 * Initial version. 352 13. Normative References 354 [RFC2342] Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342, 355 DOI 10.17487/RFC2342, May 1998, 356 . 358 [RFC8580] Murchison, K. and B. Gondwana, "Sieve Extension: File 359 Carbon Copy (FCC)", RFC 8580, DOI 10.17487/RFC8580, May 360 2019, . 362 [RFC8474] Gondwana, B., Ed., "IMAP Extension for Object 363 Identifiers", RFC 8474, DOI 10.17487/RFC8474, September 364 2018, . 366 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 367 Requirement Levels", BCP 14, RFC 2119, 368 DOI 10.17487/RFC2119, March 1997, 369 . 371 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 372 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 373 May 2017, . 375 [RFC5228] Guenther, P., Ed. and T. Showalter, Ed., "Sieve: An Email 376 Filtering Language", RFC 5228, DOI 10.17487/RFC5228, 377 January 2008, . 379 14. Informative References 381 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 382 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 383 . 385 [RFC8579] Bosch, S., "Sieve Email Filtering: Delivering to Special- 386 Use Mailboxes", RFC 8579, DOI 10.17487/RFC8579, May 2019, 387 . 389 [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension", 390 RFC 4314, DOI 10.17487/RFC4314, December 2005, 391 . 393 [RFC5490] Melnikov, A., "The Sieve Mail-Filtering Language -- 394 Extensions for Checking Mailbox Status and Accessing 395 Mailbox Metadata", RFC 5490, DOI 10.17487/RFC5490, March 396 2009, . 398 [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", 399 RFC 5229, DOI 10.17487/RFC5229, January 2008, 400 . 402 Author's Address 403 Bron Gondwana (editor) 404 Fastmail 405 Level 2, 114 William St 406 Melbourne VIC 3000 407 Australia 409 Email: brong@fastmailteam.com 410 URI: https://www.fastmail.com