IMAP4 UIDPLUS extension
obsoleted by
- rfc-4315 — Internet Message Access Protocol (IMAP) - UIDPLUS extension
Extracted elements (13)
UID EXPUNGE was introduced to prevent a replayed EXPUNGE command from removing messages that were marked \Deleted between the time the user requested the expunge and the time the server processes it, a race condition inherent in the base EXPUNGE command.
If the server does not support UIDPLUS, the client can only discover destination UIDs after a COPY by selecting the destination mailbox and issuing FETCH commands.
Clients wishing to use UIDPLUS commands MUST first test for the presence of the extension by issuing a CAPABILITY command.
Implementations MUST accept the UIDPLUS command and response-code token strings in a case-insensitive fashion, as all alphabetic characters in the formal syntax are case-insensitive.
The COPYUID response code MUST be returned only when at least one message was copied. Neither the source nor destination UID sets in COPYUID may contain extraneous UIDs or the symbol '*'.
Successful APPEND commands return an APPENDUID response code in the tagged OK response. APPENDUID carries two arguments: the UIDVALIDITY of the destination mailbox and the UID assigned to the appended message.
Successful COPY and UID COPY commands return a COPYUID response code in the tagged OK response whenever at least one message was copied. COPYUID carries the UIDVALIDITY of the destination mailbox, the source UIDs in copy order, and the destination UIDs in assignment order.
The UID EXPUNGE command permanently removes from the currently selected mailbox all messages that both have the \Deleted flag set AND have a UID included in the specified message set. Messages lacking \Deleted or not matching the UID set are unaffected.
The UIDPLUS extension is present in any IMAP4 server that returns "UIDPLUS" as one of the supported capabilities to the CAPABILITY command. It adds one new command (UID EXPUNGE) and additional data returned with successful APPEND and COPY commands.
The RFC states there are no known security issues with the UIDPLUS extension.
APPENDUID response code syntax: "APPENDUID" SP nz_number SP uniqueid — where nz_number is the destination mailbox UIDVALIDITY and uniqueid is the UID assigned to the appended message.
COPYUID response code syntax: "COPYUID" SP nz_number SP set SP set — where nz_number is the destination UIDVALIDITY, first set is source UIDs, and second set is destination UIDs, each in the order messages were copied/assigned.
UID EXPUNGE command syntax: "UID" SP "EXPUNGE" SP set — where set is the message set of UIDs to expunge (only messages in this set that also have \Deleted are removed).