Repository navigation
fix(imap): keep APPENDUID stable and apply labels on APPEND - #113
Merged
Merged
Conversation
A sync pass that listed a folder before an APPEND finished could act on that stale view afterwards: an inbox page moved the new message out of its mailbox and dropped its UID, and a deep pass pruned it as deleted. Either way the message came back under the next UID while UIDVALIDITY stayed the same, and old mail could stay filed in the inbox. - Remember each appended message and skip sync writes and prunes that were decided from a listing older than the append. - Send the placement with the import request, retry the follow-up update, and answer NO without leaving a copy when a message cannot be filed in Archive, Trash or Junk. - Apply keywords from the APPEND flag list as labels, with the same reserved names and ten-new-labels cap as STORE. A failed label write is reported as an untagged NO ahead of the tagged OK, because the message is stored. - Answer a repeated APPEND with the APPENDUID of the message already in that mailbox.
A deduplicated APPEND now adds its label keywords to the copy already cached, in any mailbox, and warns with an untagged NO when a label write fails. APPENDUID is still returned only when the copy is in the target mailbox. The inbound heal retry now honors the append record, so a listing taken before an APPEND cannot refile the message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes
Testing
The
aster-bridge-coresuite covers each case, including the stale-listing race and the heal retry.