tdp05 has asked for the wisdom of the Perl Monks concerning the following question:
I've looked at: this node. He asks the same question, but didn't give file specifics. I hope I pinpointed it above.
this node. Where the guy uses Mail::MboxParser to parse.
There was this: Mail::MboxParser::Mail::Body
Mail::Box From the page, this looks like I could just do a foreach on every email. Which I think would work, but how slow is it going to be?
I also saw mention of just looking for paragraphs that start with
"^From <email address> <date>"
Should I do this, because it seems like it could be the most basic way of doing it?
the mail will look like this:
...normal header info... Subject: Backup SUCCESS ..rest of header... Backup ID: 123 Path: <path> Backup Type: one of 3 different types Size: <in Kbytes> ...some other junk I don't need... Start time: Wed May 5 09:36:40 2004 End time: Wed May 5 09:43:19 2004 Errors: 0 some other stuff Elapsed time: 0 hr 6 mn 39 s
I'm grabbing the ID,the path, the type of backup, the size, and i'm going to throw it into a mysql table. The ID is the primary key, but the size and elapsed time aren't stored anywhere after the email, so we want to grab it for comparisions and whatnot.
Given what I'm faced with, which way should I go?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing a Pine mailbox
by kvale (Monsignor) on May 06, 2004 at 08:00 UTC | |
by tdp05 (Acolyte) on May 06, 2004 at 18:00 UTC | |
|
Re: Parsing a Pine mailbox
by matija (Priest) on May 06, 2004 at 08:26 UTC | |
|
Re: Parsing a Pine mailbox
by jaldhar (Vicar) on May 06, 2004 at 14:14 UTC |