[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-talk] mbox date fail



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