Mental on Sun, 29 Sep 2002 21:30:36 +0200


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

Re: [PLUG] Recovering 7 years of email


On Sun, Sep 29, 2002 at 01:23:08PM -0400, zeek wrote:
> 
> 
> I have years of email backups on a sundry of cdrom, floppy, and numerous
> sub-sub-sub directories that I'd like to somehow organize. For years I've
> viewed the task as too herculean or complicated that I quickly figured only
> a commercial solution would be availble, something to gladly accept my
> numerous mailboxes and transfer them to a propreitary format which could
> then only be viewed if EUL was accepted and paid for.
> 
> In recent thinking of (Open Source: my/Postgres)SQL abilities I realized
> this task might not be so difficult.
> 
> 1) A simple script to scan a mounted cdrom for mailboxes (uncompressed unix
> mbox, if it's a file and has ^From: more than once it's probably a mailbox).
> 2) Take certain elements of the mail header To: From: Date: and use that for
> indexing.
> 3) Feed it to the database
> 4) A PHP frontend to search/view/manipulate this database
> 

Depending on what you wanna do, this could be really really easy.

If you have a bunch of mbox files, parsing them will be easy. If you want
to use a database, importing stuff shouldn't be hard. There's at least one
perl module I've used to report on mbox files..... eg:


#!/usr/bin/perl -w
use strict;
use Mail::MboxParser;
# This will create a summary report of the contents of a unix mbox
my $box = shift or die "Usage: $0 <mbox>\n";

my $mbx = Mail::MboxParser->new($box,decode=>'ALL');

for my $msg ($mbx->get_messages()){
  print "\n\n";
  print 'Date: ',$msg->header()->{date},"\n";
  print 'From: ',$msg->header()->{from},"\n";
  print 'Subject: ',$msg->header()->{subject},"\n";
}

You get the idea. And yes, there's plenty of tools out there for you.
Dealing with atachements will be interesting. But it should be doable.


--
Mental (Mental@NeverLight.com)

This body. This body holding me. Be my reminder here that 
I am not alone in
This body, this body holding me, feeling eternal
All this pain is an illusion.

--Tool "Parabola"

CARPE NOCTEM, QUAM MINIMUM CREDULA POSTERO.

GPG public key: http://www.neverlight.com/pas/Mental.asc


_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug