Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Simon (89)

AOL IM: lathosjp (Add Buddy, Send Message)

Busy Man.

Journal of Simon (89)

Monday April 08, 2002
12:32 PM


[ #4033 ]

This is the toy I'm working on at the moment. I'm not sure if I'll release it; I may just release the base system with none of the add-ons. But anyway, what is it?

Suppose every mail you receive gets sent through a little program before delivery. This little program does several things. It strips off any attachments, and stores them in an SQL database, adding a note to the end of the email pointing out the ID number of the attachment in the database.
It also stores information about who the mail was sent from, the subject line, the date, some keywords as determined by Text::Keywords, and so on. The add-on "recogniser" modules get hold of the email and try to pull out various things - email addresses, patches, phone numbers, mailing addresses, and so on.

Eventually, you've got quite a database built up, which allows you to do something like this:

% mm --detach 12345
Detaching "foo.exe" (ID 12345) from Simon Cozens <>
% mm --from Simon --about Perl --dated "September 2001"
ID       Date     Subject
----  ----------  --------------
1     01/09/2001  This is a test

Neat, huh? Those are the relatively obvious uses. Now look what else we can do. Give me all the emails which contained a patch to sent by Autrijus, and save the patches into separate files:

% mm --from Autrijus --patch --detach

Find me Eiko's mailing address.

% mm --from Eiko --address

Show me that mail I sent to Tim sometime late last year, which was something to do with GraphViz, and give me the attachment I sent to him.

% mm --to Tim --about GraphViz --dated "circa October 2001" --detach

Knowing the way my memory (doesn't) operate, I think this could save me vast quantities of time. :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I keep my mail folders stored in mh folders at home for similar reasons. It's really nice to be able to do

    $ show `pick -search perlmonks`

    and find that default password when you're logging in from a new machine.

    • Just had to say: Greetings fellow n?mh user.
      Don't come across them often...
      in fact I didn't think anybody outside of
      RAND, MIT or the University of Irvine used it.
      Were that I say, pancakes?
  • I definitely vote for publishing it. Would you bundle it with, say, DBD::SQLite or something?