joeyates / imap-backup

Backup and Migrate IMAP Email Accounts
MIT License
1.37k stars 75 forks source link

Emails restored as unread #114

Closed galmok closed 2 years ago

galmok commented 2 years ago

I am testing imap-backup and when I mark an email as read, make an imap-backup, delete the email, and make an imap-restore, then email is restored, but is now marked as unread.

Can the read/unread status also be backed up and restored somehow?

joeyates commented 2 years ago

Hi @galmok thanks for the question.

Currently, imap-backup does not save this info in the backup.

Theoretically, imap-backup could save message metadata (like the read/unread status) in its '.imap' files. It sounds like an interesting idea, but it would make backwards compatibility with older backups a bit complicated.

As always, PRs are welcome! :)

galmok commented 2 years ago

Too bad this isn't there yet. I feel this really needs to be there to make imap-backup truly useful. Regarding backwards compatibility, can't the imap file have this information as an optional field with default values in the code or taken from the config file? It would make imap-backup more useful to make a seamless transition from one host to the next.

I don't know the imap protocol nor the language/libraries used, which makes me providing PRs for this project difficult.

Edit: typos fixed.

joeyates commented 2 years ago

Hi @galmok

I've just released version 7.0.1 which backs up and restores email flags.