OfflineIMAP/offlineimap

changing nametrans on a local folder invalidates all uids.

Open

#411 建立於 2016年11月28日

在 GitHub 查看
 (17 留言) (0 反應) (0 負責人)Python (1,765 star) (373 fork)batch import
enhancementgood first issueneed contributor!

描述

Local Maildir folders use the visiblename for computing their md5 hash. See here. In case there is a local nametrans, this is the folder name translated to remote, but with local separator.

This md5 hash is embedded in the maildir files. Additionally, when copying messages to a remote, it is checked whether the message md5 coincides with the actual folder md5. If not, the local uid is made negative, which means the message will get reuploaded, and assigned a new uid on the remote. See this.

Since this has to do with uid validity, which is a remote thing, It probably makes sense to use the md5 hash of the remote folder name.

However, it has unexpected consequences. Changing the local nametrans will invalidate all uids and reupload all messages. This might happen when a user with a partial nametrans only on the remote, adds a local one to have back&forth consistency. The fact that this invalidates all uids is quite unexpected.

I'm not sure what are the options here. Since apparently there has already been a md5 hash migration, we could probably do another one and transition hashes to local folder name.

貢獻者指南