473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Breaking apart MBOX

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
Jul 19 '05 #1
1 2273
MJackson wrote:
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.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1856
by: Paul Rubin | last post by:
I was surprised there was no obvious way with spamassassin (maybe I shoulda looked at spambayes) to split an existing mbox file into its spam and non-spam messages. So I wrote one. It's pretty...
2
3127
by: Brad Tilley | last post by:
Can Python parse a mbox file and forward each individual message within that file to someone else? For example, let's say I have a 10MB mbox file that has 678 messages. I'd like to send each of...
1
1800
by: John | last post by:
Hi I need to break a memo field apart by the individual lines of text it has. I only need the last two lines. How do I do this in a query? Thanks Regards
150
6320
by: tony | last post by:
If you have any PHP scripts which will not work in the current releases due to breaks in backwards compatibility then take a look at http://www.tonymarston.net/php-mysql/bc-is-everything.html and...
1
1762
by: Michael March | last post by:
I am been playing with the 'email' and 'mailbox' modules trying to read in an email at a time from an mbox file, add something to the body of a message and then write that change back out in 'mbox'...
11
4535
by: Jonathan Pritchard | last post by:
Does anyone know of a library to read/write mbox format (used to store emails e.g. in Thunderbird) in ANSI C (cross platform is key)? Is there a more appropriate place to ask this? -- Reclaim...
0
1611
by: matej | last post by:
Hi, I am writing a script to convert couple of thousand emails (in couple of hundred folders) and before I will get to the hard part -- maintaing structure folders and subfolders, and maintaing...
4
2322
by: lstrudeman | last post by:
Hello; A friend gave me this syntax and they are unavailable at the moment and I need this asap. I am trying to figure out how SQL figures this out. Below the syntax takes a field in a file and...
7
4778
by: Fabian Braennstroem | last post by:
Hi, I am wondering, if anyone tried to convert lotus nsf mails to a mbox format using python!? It would be nice, if anyone has an idea, how to do it on a linux machine. Regards! Fabian
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.