Sean Finney on Sun, 29 Sep 2002 20:00:32 +0200 |
i think you can do this in three steps instead of four: 1 ) find all the mailboxes (this is really easy, actually): cd /root-of-search find . -type f -exec file {} \; | grep 'mail text$' 2 ) decide how you want to sort this mail (like initially from sender, or by the to field, or whatever), and set up a .procmailrc 3 ) have procmail process each of the mboxes, one by one, ideally backing them up first just in case. here's a script that does it that's in the procmail(1) manpage #!/bin/sh ORGMAIL=/path/to/your/mbox if cd $HOME && test -s $ORGMAIL && lockfile -r0 -l1024 .newmail.lock 2>/dev/null then trap "rm -f .newmail.lock" 1 2 3 13 15 umask 077 lockfile -l1024 -ml cat $ORGMAIL >>.newmail && cat /dev/null >$ORGMAIL lockfile -mu formail -s procmail <.newmail && rm -f .newmail rm -f .newmail.lock fi exit 0 of course if you want to interactively go through all of this, this might not cut it, but hope it can be of some use. --sean On Sun, Sep 29 2002 at 01:23:08PM -0400, zeek wrote: > 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 > > > My question is then: It seems there would a large demand to search or browse > years of personal email archives --there must be something out there. And > yes, I have not looked yet... because typically the results are overwhelming > and I'd rather get a poll of opinion. > > Cheers, > -zeek > > _________________________________________________________________________ > 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 > Attachment:
pgpQY1qIgZErg.pgp
|
|