Subject: [sup-talk] Problem with mbox format

From: [email-masked] (Christopher Warrington)
Date: Thu, 11 Oct 2007 12:30:30 -0500

I've been having some problems with messages that appear to confuse the
mbox parser. For example, if, by chance, one of my messages contains
"From now on" and this starts a new line, I get this error when sup
tried to store the sent message in sent.mbox:
The problem was: 'no message-id field in header {} (source sup://sent offset 3998037)' (error type Redwood::MessageFormatError)
A backtrace follows:
/usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/message.rb:111:in `read_header': no message-id field in header {} (source sup://sent offset 3998037) (Redwood::MessageFormatError)
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/message.rb:110:in `each'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/message.rb:110:in `read_header'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/message.rb:104:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/sent.rb:25:in `new'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/sent.rb:25:in `write_sent_message'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/source.rb:93:in `each'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/util.rb:437:in `send'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/util.rb:437:in `__pass'

         ... 7 levels...
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/lib/sup/buffer.rb:181:in `handle_input'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.1/bin/sup:186
        from /usr/bin/sup:16:in `load'
        from /usr/bin/sup:16

After this, only the part of the message before the "From " line is
visible in sup. The entire message is in sent.mbox, however. Seems like
a parsing error/escaping error on sup's part. If I knew Ruby, I would
take a look at the code. Perhaps I'll have to teach myself some Ruby.

Also, if I save a message like this for later editing, lines that start
with "From " have a '>' perpended to them which I must delete.

(Which mbox format is sup using, by the way?)

-- 
Christopher Warrington <chrisw at rice.edu>
Jones College

---

From: [email-masked] (William Morgan)
Date: Sat, 27 Oct 2007 20:38:34 -0700

> tried to store the sent message in sent.mbox:

This should now be fixed in SVN. If you have any unquoted From's in
sent.mbox, you will have to manually fix them (i.e., change "From " to
">From " at the start of all lines) and run sup-sync --changed sup://sent.

> with "From " have a '>' perpended to them which I must delete.

This should also now be fixed. I think.

> (Which mbox format is sup using, by the way?)

The variant where "From " at the beginning of a line signifies a new
message. Content-Lines or Content-Size or whatever the header is is
ignored.

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Christopher Warrington)
Date: Sat, 27 Oct 2007 23:48:40 -0500

> ">From " at the start of all lines) and run sup-sync --changed sup://sent.

Works for me in r639. Thanks!
 
> This should also now be fixed. I think.

Not in r639.