| Mumia W. 2007-06-16, 7:12 am |
| In-Reply-To: <f5036l$c9o$00$1@news.t-online.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 80
Message-ID: <GeOci.1801$ZY1.1301@newsread2.news.pas.earthlink.net>
Date: Sat, 16 Jun 2007 09:40:54 GMT
NNTP-Posting-Host: 63.26.184.105
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread2.news.pas.earthlink.net 1181986854 63.26.184.105 (Sat, 16 Jun 2007 02:40:54 PDT)
NNTP-Posting-Date: Sat, 16 Jun 2007 02:40:54 PDT
Bytes: 4358
Xref: number1.nntp.dca.giganews.com comp.lang.perl.misc:631804 alt.fan.mozilla:34924
On 06/16/2007 02:24 AM, Tuxedo wrote:
> [...]
> formail -ds <my_crappy_mbox >>reinvigorated_mbox
>
> .... this certainly made some changes, in fact, 10 or so additional messages
> appear in the Mozilla index which did not show up earlier, including a
> couple without a valid sender which are now listed by Mozilla as from
> foo@bar, but which appear to be file fragments, i.e. not real mail.
>
> Most of the 3000+ messages, however, still do not show up in Mozilla.
>
> So I tried: ...
> formail -zds <my_crappy_mbox >>reinvigorated_mbox
> ... but this made the file no more readable in Mozilla than the previous try.
>
> and ...
> formail -rds <my_crappy_mbox >>reinvigorated_mbox
> ... but with the same result as the former try.
>
> Naturally I removed the generated (.msf) index files as well as terminated
> the Mozilla application between the tries, in case something would get
> cached otherwise.
>
> The Mozilla application simply appears to be choking on the mbox while
> building the index. The progress bar is helplessly trying to move forward,
> but then falls back, then forward a bit, and then back again, until it
> finally gives up. In other words, the graphical indicator at the bottom
> right of the application, which is meant to indicate the progress of
> building the index, never reaches its maximum.
>
> Perhaps the mbox contains some very odd characters, maybe part of some
> attachment, which causes Mozilla but not other mail clients to choke.
> Perhaps it is the result of some malformatted mail circulating via zoombie
> machines, Outlook and whatever, that affects Mozilla on multiple platforms.
>
Research the problem with the help of this website:
http://kb.mozillazine.org/
In particular, this article may (or may not) be of help:
http://kb.mozillazine.org/Inbox_stays_blank
Here is a script that, might improve things a little bit:
use strict;
use warnings;
require FileHandle;
require Email::Folder;
require Date::Parse;
require POSIX;
Date::Parse->import('str2time');
POSIX->import('ctime');
my $file = glob('~/tmp/mozmail/OldTests');
my $outfile = 'output.mbox';
my $fh = FileHandle->new($outfile, '>') or die("Stop: $!");
my $folder = Email::Folder->new($file);
my $count = 0;
while (my $msg = $folder->next_message) {
my $date = $msg->header('Date');
$date = ctime(str2time($date)); chomp $date;
$fh->print("From - $date\n");
$fh->print($msg->as_string() . "\n");
$count++;
}
print "There are $count messages in the folder.\n";
$fh->close;
Email::Folder and Date::Parse are modules you can download from CPAN.
The other modules are standard parts of Perl. You should change $file
and $outfile as appropriate. You shouldn't modify the original mailbox file.
Probably, you'll not need the script. Things should improve after you've
deleted the .msf (index) file and closed an reopened Mozilla.
(Followups set to alt.fan.mozilla)
|