[script] dis/assembling mbox email

Skip Montanaro skip at pobox.com
Fri Jun 11 01:07:19 CEST 2004

    William> Time to time, I need to 
    William>     - extract main header/body from a MIME email, 
    William>     - parse and extract multipart segments, recursively,
    William>     - walk through the email tree, and edit/delete/add stuffs
    William>     - regenerate new MIME email.


    William> Usage are 
    William>     unmbox.sh dir < email
    William>     mbox.sh dir > email


You might be interested in the splitndirs.py script which is part of the
Spambayes distribution.  There is no joindirs.py script, but it's perhaps a
five-line script using the mboxutils.getmbox function (also part of


More information about the Python-list mailing list