| Tuxedo 2007-06-16, 7:12 am |
| Mumia W. wrote:
> On 06/16/2007 02:24 AM, Tuxedo wrote:
>
> 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)
>
Excellent! However, the problem does not want to be so easily solved. It
was no problem getting the above script running with the 2 up-to-date and
non-standard modules, and after having saved the script, as fixbox.pl, I
sucessfully tested it on a small mbox file containing only 3 messages.
However, with the real file, and when using a 2GH notebook with 512MB
memory and PERL 5.8.7, munching through the approximately 150MB mbox, the
above script (or the shell) returned: "Out of Memory!". The resulting
'output.mbox' file remained empty.
Personally, I'm not a fan of Mozilla mail, and looking a bit closer, I
could not find a solution to this particular issue on kb.mozillazine.org,
either. The problematic mailbox is someone's else. I'm seriously
contemplating telling them to: 1) abandon Windows, 2) Mozilla mail.
|