[opensource] automated email parsing

Silas Baronda silas.baronda at gmail.com
Mon Apr 14 22:12:46 EDT 2008

Good old perl.  If you are thinking about using perl and your are  
piping in via STDIN then look at this.

I would say that it really matters what format your email is in  
already.  We know from 221 or 222 that it was quite easy to parse  
email in mbox format.  But there are many other popular formats like  
maildir and what not.  What is good is that most scripting languages  
actually make the grunt work easy for you to deal with.

If you just have a Mail Delivery Agent drop messages into a folder  
this would be really simple to get started.  Then you can have a cron  
job run every 5 minutes or so to read the emails.

On Apr 14, 2008, at 9:28 PM, Peter Dietz wrote:

> Paul Betts a while back made a door access email program that  
> accepted input from an email, and then was able to parse it,  
> extract data, and then make a decision on it.
> I would like to some similar thing, (not related to the door, nor  
> will it be likely to cause a stir), but it would need to take in  
> emails, grab the data, and in my case, put it in a mysql database.  
> My question is, where do I begin?
> I'm comfortable doing processing of strings, so that I can do, but  
> how do I get a program I make get activated by emails, and so and  
> so forth.
> for an example, here is some sample data... (for football)
> Statistics                  phant0mX22        BUDDHA1010
> Rushing attempts for                  5              27
> Rushing yards for                    23             286
> Passing attempts for                 30              16
> Passing yards for                   417             159
> Punts                                 1               0
> Thank you. (why do I think I'm going to get a reply that I should  
> go learn perl...)
> -- 
> ==
> Peter Dietz
> Computer & Information Science -- The Ohio State University
> _______________________________________________
> Opensource mailing list
> Opensource at cse.ohio-state.edu
> http://mail.cse.ohio-state.edu/mailman/listinfo/opensource

More information about the Opensource mailing list