Sync back local emails modification

Mario D'Amore kidpixo at
Fri Oct 23 18:07:47 BST 2015

I'm really happy that actually someone answer!

I just put the script on github, you are free to contribute :

It is a pretty naive approach, but it could :
- read a maildir directory
- cycle all the message, if there is a part the is neither text or
multipart >
    - decode the attachment
    - set the attachment to plain/text with a note on the file position
    - save the attachment in FOLDER/MAIL_NAME/ATTACHMENTS

There are a lot of thing to improve, but the first is to sync the modified
mails to the server.

In principle I would like to leave each mail in the same state it was, I
don't want to find a bunch of random unread.
But thinking about it, it make sense because I create a new mail message...

Actually, this is the normal behaviour opening the mail with

src_mbox = mailbox.Maildir('maildir-mbox', factory=mailbox.MaildirMessage)

see [1].

I use  to use "factory=None" exactly for this reason, see discussion here


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the OfflineIMAP-project mailing list