Network Working Group W. Krecicki Internet-Draft Webstorage Intended status: Standards Track June 11, 2010 Expires: December 13, 2010 Internet Message Access Protocol (IMAP) - MOVE extension draft-krecicki-imap-move-00.txt Abstract The MOVE extension of the Internet Message Access Protocol [IMAP4] 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. Status of this Memo 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 Notice 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. Krecicki Expires December 13, 2010 [Page 1] Internet-Draft imap-move June 2010 1. Conventions Used in this Document 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]. 2. Introduction and Overview 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 larger than remainings 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. 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. 3. Additional commands The following command definition is an extension to [IMAP4] section 6.4. 3.1. MOVE command Krecicki Expires December 13, 2010 [Page 2] Internet-Draft imap-move June 2010 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, 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] 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] paragraph 7.4.1. 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 4. Response Codes If server supports both 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] paragraph 4.3. Krecicki Expires December 13, 2010 [Page 3] Internet-Draft imap-move June 2010 5. Formal Syntax Formal syntax is defined using ABNF [ABNF], extending the ABNF rules defined in [IMAP4]. 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 (copy / fetch / search / store / move) ; Unique identifiers used instead of message ; sequence numbers 6. IANA Considerations This document constitutes registration of the MOVE capability in the imap4-capabilities. 7. References [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [IMAP4] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, March 2003. [UIDPLUS] Crispin, M., "Internet Message Access Protocol (IMAP) - UIDPLUS extension", RFC 4315, December 2005. [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. Krecicki Expires December 13, 2010 [Page 4] Internet-Draft imap-move June 2010 Author's Address Witold Krecicki Webstorage sp. z o.o. Jutrzenki 177 Warszawa 02-231 Poland Email: witold.krecicki@firma.o2.pl Krecicki Expires December 13, 2010 [Page 5]