Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: Mike Kelly <pioto@pioto.org>
To: <sup-talk@rubyforge.org>
Subject: [sup-talk] mbox date fail
Date: Fri, 23 Oct 2009 17:13:35 -0400	[thread overview]
Message-ID: <2aeb4e149305569502f106c7e54ae107@localhost> (raw)


Hi,

I seem to be caught in a bit of a catch-22. I can't reliably use mbox
because of shortcomings in its format. And, I can't use maildir because
sup-sync-back doesn't support it.

More specifically, I seem to come across this much more often that I
should. It's caused by someone starting a line of their message with
"From". For example:

  ...
  X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.0
  Status: 
  X-Keywords:                                                             
       
  Content-Length: 1742

  From the ticket he states that 1.2.3.4 is the IP:

  ...

That yields this exception:

  [Fri Oct 23 17:07:00 -0400 2009] unlocking
/usr/home/staff/mike/.sup/lock...
  /usr/local/lib/ruby/1.8/time.rb:184:in `local': argument out of range
(ArgumentError)
        from /usr/local/lib/ruby/1.8/time.rb:184:in `make_time'
        from /usr/local/lib/ruby/1.8/time.rb:243:in `parse'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/mbox.rb:15:in
`is_break_line?'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/mbox/loader.rb:165:in
`next'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/mbox/loader.rb:145:in
`synchronize'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/mbox/loader.rb:145:in
`next'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/source.rb:103:in
`each'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:560:in
`send'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:560:in
`__pass'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:547:in
`method_missing'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:139:in
`each_message_from'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in
`send'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in
`method_missing'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/bin/sup-sync:146
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/bin/sup-sync:141:in
`each'
        from
/usr/home/staff/mike/lib/ruby/gems/1.8/gems/sup-999/bin/sup-sync:141
        from /usr/home/staff/mike/lib/ruby/gems/1.8/bin/sup-sync:19:in
`load'
        from /usr/home/staff/mike/lib/ruby/gems/1.8/bin/sup-sync:19

Is there much of anything that I can do to mitigate this problem, aside
from manually altering every offending message?

It seems like the messages' Content-Length header should be used to skip
past the body and ignore the offending Froms? Or, at least, if that sort of
ArgumentError is thrown, maybe it should be caught and handled better?

I'm running current master (2dfd378b616243d03203e49f5ee29636051d3cbf).

Thanks.

-- 
Mike Kelly
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


             reply	other threads:[~2009-10-23 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 21:13 Mike Kelly [this message]
2009-11-01 18:46 ` William Morgan
2009-11-01 23:30   ` Mike Kelly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2aeb4e149305569502f106c7e54ae107@localhost \
    --to=pioto@pioto.org \
    --cc=sup-talk@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox