SIMPLE script to convert email to JSON (to store in couchdb)

SIMPLE script to convert email to JSON (to store in couchdb)

Cancelled

Job Description

Write a simple script in python to convert from RFC822 email --> JSON format.

This is the format I would like for JSON
http://docs.cloudmailin.com/http_post_formats/json/

Here are some scripts that do a similar thing (but not entirely)
https://github.com/maxogden/couchmail/tree/master/mbox2couch

Bonus points if you can load it into couchdb (I'll give you the URL)
Extra bonus points if you can pipe the email directly from the postfix mailbox_command.

I don't mind how you do it, probably python is best.