md2mb ===== .. py:module:: md2mb .. autoapi-nested-parse:: Convert maildir to mbox. Uses Python's included mailbox library to convert mail archives from maildir [http://en.wikipedia.org/wiki/Maildir] to mbox [http://en.wikipedia.org/wiki/Mbox] format, including subfolders. See http://docs.python.org/library/mailbox.html#mailbox.Mailbox for full documentation on this library. --- To run, save as md2mb.py and run: $ python md2mb.py [maildir_path] [mbox_filename] [maildir_path] should be the the path to the actual maildir (containing new, cur, tmp, and the subfolders, which are hidden directories with names like .subfolde.subsubfolder.subsubsbfolder); [mbox_filename] will be newly created, as well as a [mbox_filename].sbd the directory. Classes ------- .. autoapisummary:: md2mb.UTF8Mbox Functions --------- .. autoapisummary:: md2mb.custom_message_from_file md2mb.maildir2mailbox Module Contents --------------- .. py:function:: custom_message_from_file(file) Convert file content to email message. .. py:class:: UTF8Mbox(path, factory=None, create=True) Bases: :py:obj:`mailbox.mbox` Subclass of mbox that uses utf-8 for message encoding. .. py:function:: maildir2mailbox(maildirname, mboxfilename) Convert maildir to mbox format.