* [sup-talk] mbox date fail
@ 2009-10-23 21:13 Mike Kelly
2009-11-01 18:46 ` William Morgan
0 siblings, 1 reply; 3+ messages in thread
From: Mike Kelly @ 2009-10-23 21:13 UTC (permalink / raw)
To: sup-talk
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup-talk] mbox date fail
2009-10-23 21:13 [sup-talk] mbox date fail Mike Kelly
@ 2009-11-01 18:46 ` William Morgan
2009-11-01 23:30 ` Mike Kelly
0 siblings, 1 reply; 3+ messages in thread
From: William Morgan @ 2009-11-01 18:46 UTC (permalink / raw)
To: sup-talk
Reformatted excerpts from Mike Kelly's message of 2009-10-23:
> Is there much of anything that I can do to mitigate this problem,
> aside from manually altering every offending message?
I've fixed this in master. Can you try again, please?
> It seems like the messages' Content-Length header should be used to
> skip past the body and ignore the offending Froms?
This is an option, but I'm avoiding it, because Content-Length is not
guaranteed to be there, and not guaranteed to be correct.
> Or, at least, if that sort of
> ArgumentError is thrown, maybe it should be caught and handled better?
Yep, that's what I've done. I couldn't get my local system to throw
ArgumentError, even with your example, but if it's possible, it's
possible, and should be caught.
--
William <wmorgan-sup@masanjin.net>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup-talk] mbox date fail
2009-11-01 18:46 ` William Morgan
@ 2009-11-01 23:30 ` Mike Kelly
0 siblings, 0 replies; 3+ messages in thread
From: Mike Kelly @ 2009-11-01 23:30 UTC (permalink / raw)
To: sup-talk
On Sun, 01 Nov 2009 10:46:33 -0800
William Morgan <wmorgan-sup@masanjin.net> wrote:
> Yep, that's what I've done. I couldn't get my local system to throw
> ArgumentError, even with your example, but if it's possible, it's
> possible, and should be caught.
Yep, that seems to help. Thanks! (I altered the example slightly for
anonymity reasons, that might have invalidated it as a test case).
--
Mike Kelly
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-01 23:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-23 21:13 [sup-talk] mbox date fail Mike Kelly
2009-11-01 18:46 ` William Morgan
2009-11-01 23:30 ` Mike Kelly
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox