For storing mailboxes in index format, the simplest approach is the
one used by MH: one message per file, and a mailbox is a directory.
For storing messages in a single file, here is a simple scheme that
will remove all ambiguity. It's a combination of old and new
1. (old) 'From ...' (standard pattern) at beginning of line (BOL)
begins a message
2. (old) 'From ' at BOL, when part of the message body, is
converted to '>From ' before the message is added into
3. (new) '>From ', '>>From ', '>>>From ', etc., at BOL, when part of the
message body, are escaped by prepending on '>' before the message
is added into a mailbox.
4. (new) The mail agent always strips out one '>' from any instance of
'>From ', '>>From ', '>>>From ', etc. at BOL, before showing the message
to the user or moving it from a mailbox into any non-mailbox location.
Ok, look at the advantages of this scheme.
1. A mail reader using the above scheme is 100% compatible with
existing mailbox formats.
2. Said mail reader will correctly show 'From ' at BOL in a message
body, by stripping out the superfluous '>' that is added by existing
mail delivery agents.
3. If said mail reader finds occurrences of '>>From ', '>>>From ',
etc., at BOL in a message body, it may unnecessarily strip out one '>'.
In practice this is unlikely to cause problems.
4. Mail readers and delivery agents can be incrementally revised to
use this scheme.
Rahul Dhesi <dh...@rahul.net>
"please ignore Dhesi" -- Mark Crispin <m...@CAC.Washington.EDU>