Dump imap inbox to a local folder in a regular backupable format: html, json and attachements.
this program aims to save a mailbox for archive using files in indexable or searchable formats. the produced files should be readables without external software, for example, to find an email in backups using only the terminal
for each email in the imap mailbox, create a folder with the following content:
message.html if an html part exists for the message body. the message.html will allways be in utf8, the embeded images links are modified to refer to the attachments subfolder attachements the attachements folder contains the attached files and the embeded images message.txt this file contain the body text if available in the original email, allways converted in utf8 metadata.json various informations in json format, date, recipients, body text, etc... this file can be used from external applications or a search engine like elasticsearch raw.eml.gz a gziped version of the email in eml format
imap email-management metadata json