RFC 8508
RFC 8508
RFC 8508
Brandt
Request for Comments: 8508 Verizon
Category: Standards Track January 2019
ISSN: 2070-1721
Abstract
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Conventions Used in This Document . . . . . . . . . . . . . . 3
3. REPLACE and UID REPLACE . . . . . . . . . . . . . . . . . . . 3
3.1. Advertising Support for REPLACE . . . . . . . . . . . . . 3
3.2. REPLACE Command . . . . . . . . . . . . . . . . . . . . . 3
3.3. UID REPLACE Command . . . . . . . . . . . . . . . . . . . 4
3.4. Semantics of REPLACE and UID REPLACE . . . . . . . . . . 5
3.5. IMAP State Diagram Impacts . . . . . . . . . . . . . . . 6
4. Interaction with Other Extensions . . . . . . . . . . . . . . 6
4.1. ACL . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2. CATENATE . . . . . . . . . . . . . . . . . . . . . . . . 6
4.3. UIDPLUS . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.4. IMAP Events in Sieve . . . . . . . . . . . . . . . . . . 8
4.5. CONDSTORE/QRESYNC . . . . . . . . . . . . . . . . . . . . 8
4.6. OBJECTID . . . . . . . . . . . . . . . . . . . . . . . . 8
4.7. MULTIAPPEND . . . . . . . . . . . . . . . . . . . . . . . 8
5. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 9
6. Security Considerations . . . . . . . . . . . . . . . . . . . 9
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.1. Normative References . . . . . . . . . . . . . . . . . . 9
8.2. Informative References . . . . . . . . . . . . . . . . . 10
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 11
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 11
1. Overview
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
Example lines prefaced by "C:" are sent by the client, and ones
prefaced by "S:" are sent by the server.
Example:
C: A003 REPLACE 4 Drafts (\Seen \Draft) {312}
S: + Ready for literal data
C: Date: Thu, 1 Jan 2015 00:05:00 -0500 (EST)
C: From: Fritz Schmidt <fritz.ze@example.org>
C: Subject: happy new year !!
C: To: miss.mitzy@example.org
C: Message-Id: <B238822388-0100000@example.org>
C: MIME-Version: 1.0
C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
C:
C: Just saw the best fireworks show. Wish you were here.
C:
S: * OK [APPENDUID 1 2000] Replacement Message ready
S: * 5 EXISTS
S: * 4 EXPUNGE
S: A003 OK Replace completed
This extends the first form of the UID command (see Section 6.4.8 of
[RFC3501]) to add the REPLACE command defined above as a valid
argument. This form of REPLACE uses a UID rather than a sequence
number as its first parameter.
Example:
C: A004 UID REPLACE 2000 Drafts (\Seen \Draft) {350}
S: + Ready for literal data
C: Date: Thu, 1 Jan 2015 00:06:00 -0500 (EST)
C: From: Fritz Schmidt <fritz.ze@example.org>
C: Subject: happy new year !!
C: To: miss.mitzy@example.org
C: Message-Id: <B238822389-0100000@example.org>
C: MIME-Version: 1.0
C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
C:
C: Just saw the best fireworks show. Wish you were here.
C: Hopefully next year you can join us.
C:
S: * OK [APPENDUID 1 2001] Replacement Message ready
S: * 5 EXISTS
S: * 4 EXPUNGE
S: A004 OK Replace completed
The REPLACE and UID REPLACE commands take five arguments: a message
identifier, a named mailbox, an optional parenthesized flag list, an
optional message date/time string, and a message literal. The
message literal will be appended to the named mailbox, and the
message specified by the message identifier will be removed from the
selected mailbox. These operations will appear to the client as a
single action. This has the same effect as the following sequence:
1. APPEND
2. [UID] STORE +FLAGS.SILENT \DELETED
3. UID EXPUNGE
While it may be common for the named mailbox argument to match the
selected mailbox for the common use case of replacing a draft, the
REPLACE extension intentionally does not require the two to be the
same. As an example, it's possible to use the REPLACE command to
replace a message in the \Drafts special-use mailbox (see Section 2
of [RFC6154]) with a message in the \Sent special-use mailbox
following message submission.
This section describes how REPLACE interacts with some other IMAP
extensions.
4.1. ACL
The Access Control List (ACL) rights [RFC4314] required for UID
REPLACE are the union of the ACL rights required for UID STORE and
UID EXPUNGE in the current mailbox, and APPEND in the target mailbox.
4.2. CATENATE
Example:
4.3. UIDPLUS
4.5. CONDSTORE/QRESYNC
4.6. OBJECTID
4.7. MULTIAPPEND
5. Formal Syntax
capability =/ "REPLACE"
command-select =/ replace
replace = "REPLACE" SP seq-number SP mailbox append-message
uid =/ "UID" SP replace
6. Security Considerations
7. IANA Considerations
8. References
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008,
<https://www.rfc-editor.org/info/rfc5234>.
Acknowledgements
Author's Address
Stuart Brandt
Verizon
22001 Loudoun County Parkway
Ashburn, VA 20147
United States of America
Email: stujenerin@aol.com