Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > parsing messages in inbox?

parsing messages in inbox?
Thread Tools
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status: Offline
Reply With Quote
Feb 18, 2003, 03:27 PM
 
I'm trying to write a script (hopefully using Perl) that will be able to parse through certain messages in my inbox and grab specific chunks of content. Writing the Perl code that can get the content that I need isn't the problem, but getting to the actually messages in the inbox is.

I've found the inbox.mbox file that holds the information on the email messages in my inbox, but I haven't been able to find out the file format. Is there a way to open this file to view its contents? If I can see the 'layout' of the file and how the email messages are identified, I can use Perl to parse the file and grab the information that I need.

Any suggestions? Perhaps a better approach to accomplishing this? Thanks.
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
     
Addicted to MacNN
Join Date: Apr 2001
Location: europe
Status: Offline
Reply With Quote
Feb 18, 2003, 03:53 PM
 
Inbox.mbox isn't a file, it's a folder. The mails inside are plain text.
Nasrudin sat on a river bank when someone shouted to him from the opposite side: "Hey! how do I get across?" "You are across!" Nasrudin shouted back.
     
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Feb 18, 2003, 04:29 PM
 
Inside your *.mbox folder you'll find a file "mbox", it contains the mails you are looking for in the pretty straight mbox format (basically all mails simply concatenated, each starting with a "From "-line, having other lines starting with From quoted by a preceding ">").

Hope that helps.

-
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:23 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2