Behave well when using mbsync to sync maildirs #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I use mbsync to sync my maildir with remote IMAP, and it has an odd behaviour where moving a mail from one maildir to another without changing its name breaks the sync state because the UID for the message is derived from the filename alone; it seems like this is a limitation of mbsync which is otherwise a good bit of software.
These changes add an option
rename
toMailMover
which makes it concoct a new filename when it moves mail to another maildir. A similar workaround exists in e.g. mu4e.I'm guessing most afew users are either using offlineimap or some other tool for producing their maildir which is why nobody else has encountered this problem before.