Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to Maildir format #68

Closed
vasi opened this issue Aug 16, 2012 · 2 comments
Closed

Export to Maildir format #68

vasi opened this issue Aug 16, 2012 · 2 comments

Comments

@vasi
Copy link
Contributor

vasi commented Aug 16, 2012

As suggested on Hacker News ( http://news.ycombinator.com/item?id=4390504 ), it would be great if gmvault could export to a standard mail storage format like maildir.

I did some experimentation, and just creating a maildir structure and dumping the uncompressed contents of the *.eml.gz files into it works fine with Dovecot's maildir support. A file like db/2012-06/1403604702094745518.eml.gz becomes foldername/cur/1403604702094745518.${PID}.${HOSTNAME}:2, . Can I rely on the basename for each gmvault message being unique?

Each message should be put in one maildir for each label in its .meta file. We'll need to decide on a format for maildir names, for example, Dovecot uses by default ".dir.subdir"--if we use this, we'll have to escape dots in the labels since they're being used as separators.

We'll also need to map from the .meta flags to maildir flags (after the "2,"). I'm not sure how read/unread status is tracked in gm-vault, but that will control whether each message goes in cur or new, in maildir.

Anything I'm missing?

@gaubert
Copy link
Owner

gaubert commented Aug 16, 2012

@vasi Yes each filename is unique.
So you said one dir in the maildir structure per label. You will have to copy multiple times the files then as for windows there is no symbolic links (huuug). I do not really like that, if we had a way to virtualize it that would be good. As I was expecting it is much more complex that what people think on HN if you want to do something well executed and clean . Will have to think about it.

I think you have found the read unread flags in the .meta file now.

@ghost ghost assigned gaubert Aug 16, 2012
@vasi
Copy link
Contributor Author

vasi commented Aug 31, 2012

See pull request: #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants