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

Behave well when using mbsync to sync maildirs #91

Merged
merged 5 commits into from
Feb 23, 2015
Merged

Behave well when using mbsync to sync maildirs #91

merged 5 commits into from
Feb 23, 2015

Conversation

larkery
Copy link
Contributor

@larkery larkery commented Oct 17, 2014

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 to MailMover 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.

mbsync dies if you move files around but keep their names the same, after a while.

This patch randomises the names when moving things.
This corresponds to a change in MailMover which makes it rename moved mails so as not to break mbsync
@philc
Copy link

philc commented Feb 22, 2015

Any update on this? I'm also using mbsync.

teythoon pushed a commit that referenced this pull request Feb 23, 2015
Behave well when using mbsync to sync maildirs
@teythoon teythoon merged commit fcbf93f into afewmail:master Feb 23, 2015
@varac
Copy link

varac commented Mar 14, 2015

@larkery thx for the pull req, with "rename = true" it works for my now with mbsync.
Just a hint: You should consider updating the documentation as well on the next pull req ;)

@larkery
Copy link
Contributor Author

larkery commented Mar 16, 2015

Happy to help; it's been working for me for a while now, so I think it is probably trustworthy. However, someone who has actually read the maildir spec might have a different opinion about what I'm doing, so caveat emptor.

brighid pushed a commit to brighid/afew that referenced this pull request Nov 4, 2017
Previously the documentation was silent on this flag, which is an important one
for the users who want it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants