Mail Troubleshooting Take 3
Jul. 30th, 2009 11:49 amI've posted screenshots of the output from "less" that I was able to cut-and-paste into a text file. The first shot is this one, called Less Screen One; this is typical of the first few screens of stuff that come up. Then the next few look like this; this unreadable garbage goes for several screens, then it goes back to things like Less Screen One for quite some time (I can't say for the rest of the file as I don't have the time to bounce through the entire 1+GB a screen at a time).
Also at intervals it pops up the error messages:
"less(3414) malloc: *** mmap(size=1073741824) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
less(3414) malloc: *** mmap(size=1073741824) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
:"
Now you see what I see... is it of any help?
Also at intervals it pops up the error messages:
"less(3414) malloc: *** mmap(size=1073741824) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
less(3414) malloc: *** mmap(size=1073741824) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
:"
Now you see what I see... is it of any help?
no subject
Date: 2009-07-30 04:28 pm (UTC)1) Unix/Linux message - End of line is a single character (CR) instead of the Windows stadnard (CR/LF). Probably something got confused in a configuration somewhere.
2) The second looks like part of a UUENCODED message (at a guess).
3) The memory allocation errors are because something doesn't understand the end of line character in #1 and is going until it runs out of memory at a one gig limit (one gig on a single line).
no subject
Date: 2009-07-30 04:28 pm (UTC)^L = LF (Line feed)
That's what is getting munged.
I'm not sure what your system layout is - I only found one other post about your mail issues.
no subject
Date: 2009-07-30 04:48 pm (UTC)no subject
Date: 2009-07-30 05:48 pm (UTC)no subject
Date: 2009-07-30 06:06 pm (UTC)no subject
Date: 2009-07-30 06:47 pm (UTC)Changing the ^M to your favorite line break while removing any other line breaks should reformat it correctly.
The stuff in the second view is definitely a UUEncoded message. These are a headache to "hand" decode with an external program.
I used to have a UUDECODE command line program but it won't run anymore under modern OSs (least of a Mac...)
no subject
Date: 2009-07-30 06:51 pm (UTC)http://www.macports.org/
no subject
Date: 2009-07-30 07:00 pm (UTC)no subject
Date: 2009-07-30 05:47 pm (UTC)no subject
Date: 2009-07-30 06:01 pm (UTC)^L = FF (Form Feed/Page break)
no subject
Date: 2009-07-30 06:06 pm (UTC)^M^J
I used to write software inside of a telecom app's scripting (y'know, modems, talking to BBSes and 'online services' kind of thing) and it got very familiar...^M^J
no subject
Date: 2009-07-30 04:40 pm (UTC)If that were my mailbox, what I would do is:
- Use m0rlock's perl script to convert the DOS end of lines to Unix.
- Break the file up into N-line pieces with split.
- Edit the first piece with Emacs and look at the line endings and pray that I can tell the difference between good line breaks (with white space or punctuation at the ends) and bad splits (no white space or punctuation).
- Create a replace expression or macro that deletes the line ends for bad splits and run that macro on every piece. I could do it in Perl or Python (or, sed for that matter) but for this kind of thing I want to see it work in real time.
- If I can't do it global then I figure out a way to repair broken headers as automatically as possible.
- Catenate all the pieces together again and load it up.
For the record, I've unmunged plenty of mail files before. This one takes the prize for weirdness for the mix of DOS and Unix end of lines and the misplaced ends.
Don't worry about Screen Two. That's MIME base64-encoded data, an attachment of some sort.
no subject
Date: 2009-07-30 04:48 pm (UTC)But the alternative is losing all that mail. Sigh.
no subject
Date: 2009-07-30 07:39 pm (UTC)no subject
Date: 2009-07-30 08:06 pm (UTC)I tried what I think is "m0rlock's perl script" (perl -npe 's/\r//g' Inbox > NewInbox ), and after sitting for a while it came back with:
"Substitution loop at -e line 1, <> line 1."
no subject
Date: 2009-07-31 05:31 am (UTC)Can you post a small chunk of the file somewhere? If you run
head -c 10000 Inbox > tmpInbox
it'll copy the first 10000 bytes of Inbox to tmpInbox. That way we'd have something we could experiment on. You can adjust 10000 down if you have privacy concerns, or up if you don't (a bigger sample would be better, of course).
no subject
Date: 2009-07-31 11:28 am (UTC)Remember when working on it that this is a Netscape mail program running on an OSX Mac, in case that makes any difference.
no subject
Date: 2009-07-31 04:38 pm (UTC)no subject
Date: 2009-07-30 10:32 pm (UTC)Odds are that the file is fine, it just needs to get run thru the right software to split out messages.