Hi,

I have a broken IMAP-Server which violates the imap protocol. I want 
gladly to migrate my mail and switch the server. I worked with the ruby 
larch program to overcome the discapabilities of my actual server.

The only thing which is left to do is to properly escape " and ( )
characters in the mail envelope. I had to do some kind of monkey patch
here I think, because I had to look, whether the character is a envelope
separator or if its just malencoded in the subject attribute (one could
use the comma to verify that).

My server throws

/usr/lib/ruby/1.9.1/net/imap.rb:3277:in `parse_error': unexpected token
QUOTED (expected SPACE) (Net::IMAP::ResponseParseError)
          from /usr/lib/ruby/1.9.1/net/imap.rb:3129:in `match'
          from /usr/lib/ruby/1.9.1/net/imap.rb:2226:in `envelope'
          from /usr/lib/ruby/1.9.1/net/imap.rb:2212:in `envelope_data'
          from /usr/lib/ruby/1.9.1/net/imap.rb:2187:in `msg_att'
          from /usr/lib/ruby/1.9.1/net/imap.rb:2167:in `numeric_response'
          from /usr/lib/ruby/1.9.1/net/imap.rb:2109:in
`response_untagged'
          from /usr/lib/ruby/1.9.1/net/imap.rb:2089:in `response'
          from /usr/lib/ruby/1.9.1/net/imap.rb:2015:in `parse'
          from /usr/lib/ruby/1.9.1/net/imap.rb:1166:in `get_response'
          from /usr/lib/ruby/1.9.1/net/imap.rb:1074:in
`receive_responses'
          from /usr/lib/ruby/1.9.1/net/imap.rb:1060:in `block in
initialize'

on fetch envelope. Could you help me with that? Where to start?

kind regards,
Henning