Breaking apart MBOX

M

MJackson

I'm new to perl. I need to read in the mailbox (mbox) and break it apart
into seperate emails. Of course each email may be different lengths. Each
email starts with From, but there are other lines in the email starting with
From: (notice the colon). So, an email starts at From and ends at the
character prior to the next From.

I then need to store each email off into it's own file, numbered such as
00001, 00002, etc. there will be very many of these.

Any ideas.

Any help greatly appreciated.
Michael
 
G

Gunnar Hjalmarsson

MJackson said:
I'm new to perl. I need to read in the mailbox (mbox) and break it
apart into seperate emails. Of course each email may be different
lengths. Each email starts with From, but there are other lines in
the email starting with From: (notice the colon). So, an email
starts at From and ends at the character prior to the next From.

I then need to store each email off into it's own file, numbered
such as 00001, 00002, etc. there will be very many of these.

Check out the read_mbox() function in the CPAN module Mail::Util.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top