-
-
Notifications
You must be signed in to change notification settings - Fork 828
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
Add Annotations support #818
Comments
Do you actually have reason to need it? Seems that servers that implement it are extremely rare and that clients that implement it are even rarer. Just seems like an epic waste of time to me. |
I would like to implement a client that supports it. I believe there are many uses cases and hope to see adoption broaden. Of course I do understand why it's not been a top priority for this project. |
Just to save anyone (including myself) the trouble later, the specification for this is https://tools.ietf.org/html/rfc5257 |
FWIW, ANNOTATE extension support is not likely to broaden among clients and servers. It's been over a decade since its introduction and has seen very little acceptance. Based on what I've seen while working on implementing this feature so far, the reason is likely the complexity and incompleteness of the extension. For example, the only real annotations that are standardized are Anyway, I've implemented the ANNOTATE support classes and the The number of new public methods that I'll have to add to |
I ended up just adding a Even though the IMAP STORE (and UID STORE) commands are used for storing annotations, the syntax doesn't work quite like Seems that the way you "remove" an annotation is to simply set the value to Still left to do are overloading the Here's what I'm thinking... Since I have to pretty drastically break API/ABI by introducing overloaded If I wait until MailKit 3.0 (for which there were no plans until now), I can make the following changes: Redesign the Fetch() API so that it works more like this: var request = new FetchRequest {
AnnotationEntries = new AnnotationEntry[] { new AnnotationEntry ("/*") },
AnnotationAttributes = new AnnotationAttribute[] { AnnotationAttribute.Value, AnnotationAttribute.Size },
BodyStructure = true,
Envelope = true,
Flags = true,
InternalDate = true,
};
var fetched = folder.Fetch (0, -1, request); For Add/RemoveSetFlags() (and Labels), the API could look something like this: var options = new StoreOptions {
UnchangedSince = modseq,
Silent = true
};
folder.Store (options, uids, StoreAction.Set, flags, keywords);
Anyway... the above Once that is all done, I could remove all of the existing Add/Remove/SetFlags() methods and move them into an |
@jstedfast I've been reviewing the annotate branch code and am thrilled to see this being pursued! The MessageSummaryItems.Annotations flag provides a good way for client implementers to start getting their feet wet right now while retaining backward compatibility. I agree that the best API for a complete implementation would demand breaking compatibility in a way that is similar to what is illustrated in your Fetch() and Store() examples, so yes it would seem reasonable to earmark this work for v3.0. Just to briefly comment on the issue of adoption - while there's been an obvious "failure to launch" over the past decade, efforts like this could have a profound effect on what happens next. I'd like to see adoption broaden and a growth in standardized annotations. Support from key libraries like MailKit could easily bring this about. As always, your hard, thoughtful work is sincerely appreciated. |
@pm64 thanks for taking a look over the changes and providing some feedback, that's always nice to get when I'm working on such large features. I like knowing whether the API's I'm hashing out will work for the needs of the developers that want to use them. I'm hoping to finish this up and make a 2.3.0 release with the existing Fetch() API in the next 2 weeks or so. I think I shouldn't have too much difficulty finishing up the Append() methods. Then I just need to write unit tests to make sure everything is working properly. |
Status Update:
|
While MailKit exposes the ImapEvent.AnnotationChange field ("An IMAP event notification for message annotation changes"), the documentation states that "Annotations are currently not supported by MailKit". I'm opening this feature request to document this gap as an issue.
The text was updated successfully, but these errors were encountered: