Modifying message attributes


C: STORE 4 6-7 +FLAGS=DELETED
S: * FETCH 4 FLAGS=SEEN,DELETED
S: * FETCH 6 FLAGS=SEEN,DELETED
S: * FETCH 7 FLAGS=SEEN,DELETED
S: +OK STORE completed
C: STORE 4 "INTERNALDATE=Mon, 20 Jan 2003 18:43:09 -0500"
S: * FETCH 4 "INTERNALDATE=Mon, 20 Jan 2003 18:43:09 -0500"
S: +OK STORE completed

The STORE command updates attributes of existing messages. A list of message numbers, as whitespace-delimited words, follows the STORE. m-n designates messages #m through #n, inclusively.

One or more words follow the message number list; they specify which attributes to set. Attribute settings are generally specified as name=value. As is with the FETCH command, servers should ignore attributes they do not recognize. The following attributes are defined at this time:

FLAGS=list

Sets the messages flags precisely to list, which is a comma-separated list of message flags. See Reading message attributes for a list of defined message flags.

+FLAGS=list

Adds the flags in list to the messages' flags. Other flags, if they are set for a message, remain set.

-FLAGS=list

Remove the flags in list from the messages' flags. Other flags, if they are set for a message, remain set.

KEYWORDS=list

If the server's capability list includes KEYWORD, then set the keywords associated with the message to list, which is a comma-separated list of keywords. See SMAP connection negotiation for more information.

+KEYWORDS=list

Adds keywords named in list, which is a comma-separated list of keywords, to the existing keywords already set for the message. Existing keywords remain unaffected.

-KEYWORDS=list

Removes keywords named in list, which is a comma-separated list of keywords, from the list of existing keywords associated with this message.

INTERNALDATE=date

Set the INTERNALDATE timestamp on a message to date, which is an RFC-2822 formatted date/time value. See Reading message attributes for more information on the INTERNALDATE attribute.

The server's response includes * FETCH single line replies that give the updated attributes of all affected messages. This is specifically needed when updating message flags, and is optional when updating INTERNALDATEs (there's not much point in echoing back the same timestamp).