mirror of
https://github.com/d99kris/nmail.git
synced 2026-04-26 09:46:01 +03:00
[GH-ISSUE #49] [Enhancement] Export database format #47
Labels
No labels
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nmail#47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Kabouik on GitHub (Jul 16, 2020).
Original GitHub issue: https://github.com/d99kris/nmail/issues/49
Originally assigned to: @d99kris on GitHub.
I tend to dislike deleting my emails from server, as having an online copy makes my email database agnostic to the machine I'm currently using. However, this is not great for security reasons, ecological reasons, and time will come when I fill all server space I'm allowed to use with my different email providers anyway.
nmailstores emails in a human readable (unless encrypted, of course) cache structure, which I like, but I wonder how standard this format is. If you decide in 5 years to discard all vowels from your email client because reasons, and I find this decision is not great for my use so I want another client, can I reimport the local email cache to most other clients?If not, while keeping the current cache architecture, would it make sense to add an
nmail -d /path/to/confdir --archive-local-cache /path/to/archivecommand line option? I'm not familiar with what are the available format standards. I just remotely heard about mbox when I was usingmailpile(which I still like by the way), but I didn't really master the workflow.Perhaps there are already standalone tools for that that would be compatible with the
nmailcache structure, in which case just a wiki entry would be great.@d99kris commented on GitHub (Aug 2, 2020):
The email message cache format used by
nmailis fairly portable. If I simplyopena cached.emlfile fromnmailon my system, Thunderbird opens the cached email and shows it correctly.However, it's probably not a single step to move an entire cached mailbox from
nmailinto another email client. It could be worth investigating and supporting this, either with a built-in functionality or as a standalone migration shell-script (or possibly just documentation if it's very simple).Just one note regarding this:
nmailcurrently only supports the IMAP protocol and mirroring a server-side folder structure.nmaildoes not support local / offline-only folders. So it does not currently provide means to move messages from server to local storage. I am not very inclined to support local-only folders, as it potentially comes with more complex user operation, but it can be suggested and discussed of course.@Kabouik commented on GitHub (Aug 4, 2020):
All three options look good to me.
Good to know, thank you for the clarification. As long as it is documented (so that people don't delete from server and then expect
nmailto support offline-only folders) and the email archives can be accessed in other clients easily, that's perfectly fine. It would work only as archiving old emails, not really to continuously clean the server and keep it empty at all times, but that's still useful.@d99kris commented on GitHub (Jan 12, 2021):
Support for this has been documented / implemented in above commit. Refer to the following README section for documentation https://github.com/d99kris/nmail#accessing-email-cache-using-other-email-clients
@Kabouik commented on GitHub (Jan 15, 2021):
Perfect, thank you @d99kris. All my accounts are currently encrypting emails so I cannot try right now, but I will definitely use it for archive purposes.
I'll see if I can combine it with
openssl enc -d -aes-256-cbc -md sha1 -in /path/to/emlto first script decryption of all .eml and /hdr files inimap/and then run the maildir script. Else I may just disable encryption temporarily to do a full scan, use the maildir script, encrypt the output maildir in a different way for archiving, and restore encryption in my nmail configuration and do a full scan again.@d99kris commented on GitHub (Jan 15, 2021):
Yes it should be possible to extend the script to handle decryption. There's one problem though, the folder names (in the file system) are SHA256 hashes of the original folder names. But if you decrypt
~/.nmail/cache/imap/foldersyou'll get a list of the folder names, and can then calculate SHA256 hashes for each to determine which one they map to.We can consider using folder name encryption instead of hashing perhaps for the future. To make it easier to decrypt. Only issue is that the file system folder name become very long.