Commit Graph

21 Commits (5d968b7c40bfd4344fd543e0513204c5d17fe291)

Author SHA1 Message Date
Manos Pitsidianakis 5d968b7c40
imap: fix out of bounds panic on receive EXPUNGE
Closes #82
2020-10-11 16:53:04 +03:00
Manos Pitsidianakis 28deba708c
melib/imap: check if FETCH reply was intended for us
After sending a FETCH, the command results might be mixed with
unsolicited FETCH replies. Check if that happens.
2020-09-20 15:00:03 +03:00
Manos Pitsidianakis ea0fb114e1
melib/imap: delete reverse_modseq storage
Modsequences are not unique, and many messages may share the same
modsequence. So storing a reverse mapping of modsequences to messages is
invalid.
2020-09-20 13:29:57 +03:00
Manos Pitsidianakis 3004789f32
melib/imap: FETCH comma-sep list on untagged Recent response
FETCHing RECENT messages when receiving an untagged RECENT response from
the server didn't separate the message numbers with comma but with
space, which is invalid.
2020-09-18 12:10:44 +03:00
Manos Pitsidianakis 3618bdcffb
melib/imap: treat server input as bytes
Server input was assumed valid ascii and converted haphazardly to &str.
Don't do that, since it might not be valid UTF8.
2020-09-16 15:17:48 +03:00
Manos Pitsidianakis d00055fdb1
melib/imap: update online instant only on server read IO 2020-09-11 17:02:27 +03:00
Manos Pitsidianakis 927a0c3cc0
melib/imap: prevent panic in untagged fetch response 2020-09-11 00:06:32 +03:00
Manos Pitsidianakis b4fe34eacf
melib/imap: add ImapCache trait 2020-08-28 00:31:35 +03:00
Manos Pitsidianakis be2d268a20
melib/imap: build uid<>msn cache in {select,examine}_mailbox() 2020-08-27 17:26:07 +03:00
Manos Pitsidianakis 209bd98814
melib/imap: fix cache not being updated in some events 2020-08-27 17:25:05 +03:00
Manos Pitsidianakis f7c9f21575
melib/imap: add CONDSTORE support
Closes #52
2020-08-26 00:54:06 +03:00
Manos Pitsidianakis 7bbfd188ef
melib/imap: move current_mailbox to ImapStream
ImapStream holds the connection state (current command id), so it makes
sense to move current_mailbox state there. That way, when a connection
drops for whatever reason the old current_mailbox is dropped and not
carried over to new connections.
2020-07-27 15:06:56 +03:00
Manos Pitsidianakis 031e81ac8f
imap: add UntaggedResponse::UIDFetch 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis 931863436d
imap: remove blocking imap backend, replace with async 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis f8b84a192c
imap: add current_mailbox enum MailboxSelection
Add enum to track the currently selected Mailbox in the IMAP connection
2020-07-06 11:32:03 +03:00
Manos Pitsidianakis 91badc3960
imap: count message totals using HashSet
This way it's easy to know if a flag change in an envelope requires the
unseen total of a mailbox to change.
2020-06-26 21:12:56 +03:00
Manos Pitsidianakis 64e5d4af4f
imap/untagged.rs: properly queue refresh events
RefreshEvents where added in self.uid_store.refresh_events queue though
ImapConnection has a method add_refresh_event() that drains the queue if
possible
2020-06-23 20:11:05 +03:00
Manos Pitsidianakis d7444a5b19
imap: recognize EXPUNGE events 2020-06-23 20:11:04 +03:00
Manos Pitsidianakis 2d3f49d64d
imap: index by (MailboxHash, UID) instead of just UID
Mailboxes can share UIDs.
2020-06-11 11:41:08 +03:00
Manos Pitsidianakis 6ec249dd7f
melib: update nom dependency from 3.2.0 to 5.1.1
That was hecking exhausting
2020-06-06 23:19:07 +03:00
Manos Pitsidianakis 815ff98acc
imap: add smarter untagged reply detection 2020-05-30 14:43:44 +03:00