Hi,

Michael Convey <[email protected]> wrote:
 |On Sat, Oct 3, 2015 at 3:44 AM, Steffen Nurpmeso <[1]sdaod\
 |[email protected][/1]> wrote:
 |Michael Convey <[2][email protected][/2]> wrote:
 | |In the mailx message below, what do the following mean?
 | |Status: RO
 | |X-Status: A
 | |
 | |Is there a list of all the "Status" and "X-Status" codes? 
 |
 |If you can read source code, yes:

 |Interesting, thank you. I went through the mailx (nail-11.\
 |25) source code and and did some testing. I believe all of\
 | the status codes (that are 
 |reported to users) are as follows: 

For one we have status that is printed in the *headline*[1]
variable (shown is the entry of the variable *attrlist*[2] that
corresponds to the message flags the most).  What you see for
`headers' or `from'.  In general these correspond to the POSIX
standardized message states[3].

  [1] http://sdaoden.users.sourceforge.net/code-nail.html#382
  [2] http://sdaoden.users.sourceforge.net/code-nail.html#351
  [3] http://sdaoden.users.sourceforge.net/code-nail.html#24

These message states are deduced from a persistant state that we
learn about when we open a mailbox, and also reflect any
subsequent actions on the messages in this mailbox, of course.

The Status: and X-Status: message header fields are used to make
the status flags of messages persistant once the mailbox is saved
/ the MUA is left (but not if the `exit' command is used).  Note
that the actual content of "these flags" depends on the format of
the mailbox (e.g., MBOX, maildir, "IMAP").  For the MBOX format
i've shown you what is possible, and even those are not
standardized in RFC 4155 nor any other standard i know of, but
seem to originate in long-time-best-practice (well we could use
more but this is not portable; maybe a future S-nail will
(optionally) support another header to be able to _not_ loose any
state).  Other formats, like IMAP, support much more flags in
general (e.g., \draft), but we don't support that, at least not in
a roundtrip fashion and gracefully.

My advise would thus be not to take care for Status: and
X-Status: at all, since they are in effect a mailbox-format
specific persistant storage.  For BSD Mail / mailx / S-nail
message states are rather volatile, for at least some years to
come.

Btw. i've just pushed something that i hope is an improvement to
the section backing [3].  And am thinking about adding information
about the current (volatile) message state to the message display,
but that not yet.  Thanks.
Ciao,

--steffen

------------------------------------------------------------------------------
_______________________________________________
nail-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nail-devel

Reply via email to