-
Notifications
You must be signed in to change notification settings - Fork 22
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
Discarded EXPUNGE/EXISTS responses #72
Comments
Yeah, that's a good point, and something I've wanted to fix for a while. I think the way we want to do this is implement |
i think we should take an even broader perspective on this, as not only idle and notify, but also a number of other imap commands (like noop, but as i read rfc3501 sec. 5.3, 5.5 and 7 basically any command) can produce out-of-band responses that we need to be able to deal with. what do you think of having a sort of queue/iterator/channel (in golang-speak) for responses that arent related to the current command? |
so, while having some more thoughts on this i ended up with the following question: how unwilling are we to adopt imap-proto types in the public interface of rust-imap? the history of ending up at that question is roughly as follows: having one iterator/channel of all unsolicited server responses depends on having one common supertype for all possible responses (which are at least async responses (e.g. from IDLE/NOTIFY responses) are usually single-line/single-item updates, not complete mailbox/fetch information "blocks" like the examine/fetch responses in rust-imap currently are. recent/exists/expunge only carry an alternatively, we could do something like keeping track of all mailboxes and return complete |
Hmm, I'm not entirely sure I follow. I'm not against directly exposing |
NOTIFY responses include Fetch, so we'd need that, yes. the part i was trying to get at was that rust-imap on the other hand using the imap-proto types for FETCH responses, namely |
I could be wrong, but surely a |
well, as far as i understood rfc5465 (the example on page 7 specifically), when the server sends fetch responses, any of the fetch command responses from the original imap rfc can be a part of that. trying to test that, i didn't get dovecot to accept the more extended event sets like so for now, i think i'll go for just the |
Let's move further discussion to jonhoo/rust-imap#72. |
When the wait functions return on an
IdleHandle
, the response doesn't contain the list of untagged EXPUNGE and EXISTS responses that have occurred. This means we don't necessarily know which sequence ids correspond to which messages anymore. E.g, we may be able to determine that a message was deleted because theexists
parameter on the mailbox was decremented, but we don't know if that was the message with sequence id 1 or 10,000. This means that we have to maintain a record of the UID list and run unnecessary UID searches sometimes.The wait functions currently return a Result<()>. They could be updated to return a list of EXPUNGE and EXISTS responses.
The text was updated successfully, but these errors were encountered: