Folders and message sync need to honor UIDValidity flag #93

Closed
opened 2019-11-28 19:34:43 +01:00 by mikegioia · 0 comments
mikegioia commented 2019-11-28 19:34:43 +01:00 (Migrated from github.com)

Describe the bug
I waited about a year between syncs, and there were hundreds of messages being pulled down. After I deleted a few messages they kept coming back as "message id not found" when attempting to load the message ID from the unique ID.

The unique ID must be stale and it most likely has to do with the UIDValidity flag on the folder being different. We need to store this flag on the folder (comes back from mailbox->select()) and if it's different, then we will need to update all of the unique IDs on all of the messages in the folder.

Requirements

  • Add a new uid_validity flag to the folders table
  • Add a new uid_validity flag to the messages table
  • During folder sync, call ->select() on each folder and update the UIDValidity flag
  • During message sync, if the validity flag on the message differs from the folder, then update the unique ID and message number on the message
**Describe the bug** I waited about a year between syncs, and there were hundreds of messages being pulled down. After I deleted a few messages they kept coming back as "message id not found" when attempting to load the message ID from the unique ID. The unique ID must be stale and it most likely has to do with the UIDValidity flag on the folder being different. We need to store this flag on the folder (comes back from `mailbox->select()`) and if it's different, then we will need to update all of the unique IDs on all of the messages in the folder. **Requirements** - [x] Add a new `uid_validity` flag to the folders table - [x] Add a new `uid_validity` flag to the messages table - [x] During folder sync, call `->select()` on each folder and update the UIDValidity flag - [x] During message sync, if the validity flag on the message differs from the folder, then update the unique ID and message number on the message
Sign in to join this conversation.
No description provided.