The MOVE extension of the Internet Message Access Protocol [IMAP4] (Crispin, M., “INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1,” March 2003.) provides a feature intended to reduce the amount of time and resources used by usual complicated methods of moving messages between mailboxes by providing the capability of directly moving messages.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress.”
This Internet-Draft will expire on December 13, 2010.
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
In examples, "C:" and "S:" indicate lines sent by the client and server respectively.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [KEYWORDS] (Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.).
Most of IMAP clients are moving messages between mailboxes by use of sequence of COPY, STORE +FLAGS (\Deleted) and EXPUNGE commands. This, though functionally equivalent to moving messages, is a lot more complicated on the server side than simple move. When moving large amounts of messages this can create unnecessary loads and delays on server side. It also prohibits user from moving a message which is larger than the remnant of his quota
The MOVE extension allows simple single-command moving of messages between mailboxes without creating additional unnecessary server-side loads and without requiring user consideration about his quota limits when simply moving message and not changing the overall amount of data stored in his account. MOVE command can be implemented as an atomic operation which is impossible with three-commands sequence currently used.
The MOVE extension is present in any IMAP server implementation which returns "MOVE" as one of the supported capabilities to the CAPABILITY command.
The MOVE extension defines one additional command which MUST be supported by server that returns supports MOVE extension.
The following command definition is an extension to [IMAP4] (Crispin, M., “INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1,” March 2003.) section 6.4.
Arguments: sequence set mailbox name Data: untagged responses: EXPUNGE Result: OK - move completed NO - move error: can't move those messages or to that mailbox BAD - command unknown or arguments invalid
The MOVE command moves messages from the currently selected mailbox to the end of the specified mailbox. Messages that are moved are expunged from selected mailbox. Any messages that are not included in the sequence set or do not exists are unaffected. All flags (including \Deleted) and message internal date are persistent through move.
If the server does not support the MOVE capability, the client should fall back to using the regular COPY, STORE, EXPUNGE sequence.
Additionally if MOVE command can be directly preceeded by UID command, the sequence set argument is then treated as unique identifiers sequence instead of message sequence numbers as defined in [IMAP4] (Crispin, M., “INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1,” March 2003.) paragraph 6.4.8.
Command EXPUNGE untagged responses reports that the specified message sequence number has been permanently removed from selected mailbox (and moved to specified mailbox) as defined in [IMAP4] (Crispin, M., “INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1,” March 2003.) paragraph 7.4.1.
The MOVE command SHOULD be atomic and server SHOULD keep both mailboxes in consistent state at all times, at no time SHOULD the moved messages be visible by any concurrent session in both source and destination mailboxes or in none of these mailboxes. The server MUST assure that after succesful operation all the moved messages are in the destination mailbox and no moved messages are in the source mailbox. The server SHOULD assure that after unsuccesful operation no messages are moved to the destination folder and all messages remain in source folder. In case of unsuccesful operation the server MUST assure that no messages that were being moved are expunged from source mailbox without being moved to destination mailbox.
Example: C: A003 MOVE 3000:3002 Trash S: * 3002 EXPUNGE S: * 3001 EXPUNGE S: * 3000 EXPUNGE S: A003 OK MOVE completed C: A004 UID MOVE 4000:* Trash S: * 3010 EXPUNGE S: * 3009 EXPUNGE S: * 3008 EXPUNGE S: A004 OK MOVE completed
If the server supports both the UIDPLUS and MOVE extensions it SHOULD return COPYUID response code as a part of tagged OK response to a MOVE command, as defined in [UIDPLUS] (Crispin, M., “Internet Message Access Protocol (IMAP) - UIDPLUS extension,” December 2005.) paragraph 4.3.
Formal syntax is defined using ABNF [ABNF] (Crocker, D., Ed. and P. Overell, “Augmented BNF for Syntax Specifications: ABNF,” November 1997.), extending the ABNF rules defined in [IMAP4] (Crispin, M., “INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1,” March 2003.). The IMAP4 ABNF should be imported first before attempting to validate these rules.
capability =/ "MOVE" command-select =/ move move = "MOVE" SP sequence-set SP mailbox uid =/ "UID" SP move
This document constitutes registration of the MOVE capability in the imap4-capabilities.
|[ABNF]||Crocker, D., Ed. and P. Overell, “Augmented BNF for Syntax Specifications: ABNF,” RFC 2234, November 1997 (TXT, HTML, XML).|
|[IMAP4]||Crispin, M., “INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1,” RFC 3501, March 2003 (TXT).|
|[UIDPLUS]||Crispin, M., “Internet Message Access Protocol (IMAP) - UIDPLUS extension,” RFC 4315, December 2005 (TXT).|
|[KEYWORDS]||Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” BCP 14, RFC 2119, March 1997 (TXT, HTML, XML).|
|Webstorage sp. z o.o.|