MBOX-Line: From mrc at Washington.EDU  Wed Jan 30 23:11:22 2008
To: imap-protocol@u.washington.edu
From: Mark Crispin <mrc@Washington.EDU>
Date: Fri Jun  8 12:34:41 2018
Subject: [Imap-protocol] Should IMAP APPEND create a sent or unsent
	message?
In-Reply-To: <fc.00802cf1026ac56600802cf1026ac566.26adfec@cciu.org>
References: <fc.00802cf1026ac56600802cf1026ac566.26adfec@cciu.org>
Message-ID: <alpine.OSX.1.00.0801302244470.10877@pangtzu.panda.com>

The reason why RFC 3501 is silent on the topic of "unsent" vs. "sent" 
messages is that that is a concept that, while perhaps extremely 
meaningful to the two software packages in question, is utterly 
meaningless in the context of the IMAP protocol.

I invented the IMAP protocol, and wrote multiple implementations of IMAP. 
Yet, in spite of having read your message multple times, I still have no 
clear idea of what you mean by a "sent" message vs. an "unsent" message. 
It's not a concept that exists in the Internet email framework.

A message does not contain the necessary information to send a message. 
Many novices are misled into thinking that the message header has delivery 
data; it does not.  It may indeed have a copy of some of the information 
used to deliver the message, but note the words "copy" and "some".

Nor is IMAP used to send messages.  The Lemonade extensions to IMAP allow 
data from a message in IMAP to be fetched as part of a message being sent; 
but in no way is IMAP actually "sending" any message.

All messages in IMAP are immutable.  Message data may be fetched from an 
IMAP message, and that data can be modified and uploaded via APPEND (and 
CATENATE for a Lemonade-capable IMAP) -- but only into a newly-created 
message which, once created, is immutable.  Since the newly-created 
message is a new instance, it may be different than the original message 
(and, unless deleted and expunged, the original message remains as-is); 
but it has no relationship to the original message.

The only mutable aspect of the message is certain elements of its 
metadata, specifically, the message flags.  Now, a client may create a 
message flag called "sent" or "unsent", but the meaning of that is 
completely defined by the client and not by IMAP.  For all IMAP knows, 
"sent" may mean "stinking excrement, not tasty".  Only the predefined 
flags starting with "\" (such as \Deleted) have meaning to IMAP, as 
opposed to being blobs that IMAP carries.

As these non-predefined flags are completely client (or human) defined, it 
is not surprising that two different software packages and/or human users 
have different interpretations.  It is would be pointless for me to argue 
that "sent means stinking extrement, not tasty" and you to argue that it 
means "record of already sent mail" -- from the point of IMAP, we're both 
right.

I don't know if this explanation makes sense to you or not.  Hopefully 
some other people can chime in with perhaps different explanations that 
may ultimately make things clear.

Regards,

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

