teythoon/afew — pull request #91 by larkery (2014-10-17 13:03:07+00:00)
Title: Behave well when using mbsync to sync maildirs

I use [mbsync](http://isync.sourceforge.net/mbsync.html) 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](https://code.google.com/p/mu0/issues/detail?id=76).

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.