Skip to content

Instantly share code, notes, and snippets.

@MarkusH
Created January 17, 2015 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkusH/15d06d269087268d9b48 to your computer and use it in GitHub Desktop.
Save MarkusH/15d06d269087268d9b48 to your computer and use it in GitHub Desktop.
Recover Thunderbird mbox mails
In [1]: import mailbox
In [2]: mbox = mailbox.mbox('/tmp/mbox/INBOX')
In [3]: maildir = mailbox.Maildir('/tmp/maildir/')
In [4]: for msg in mbox.itervalues():
...: maildir.add(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment