Commit Graph

32 Commits (b1a71887710153f0f98b25b2f224fbe37f7a6889)

Author SHA1 Message Date
Manos Pitsidianakis b1a7188771
Clippy fixes 1 year ago
Manos Pitsidianakis 5634f95553 Rename MeliError struct to Error 2 years ago
Manos Pitsidianakis 259aeb0087 Convert {Account,Mailbox}Hash from typedef to wrapper struct 2 years ago
Manos Pitsidianakis b138d9bc61 melib: fix some clippy lints 2 years ago
Manos Pitsidianakis 24b4c117e7
melib: don't use both {set,push}_references()
set_references() already calls push_references()
3 years ago
Manos Pitsidianakis 781a1d0e1b
melib/backends: add collection() method to MailBackend
Keep track of the Collection state in the backend side
3 years ago
Manos Pitsidianakis 4939a1ad9e
melib/imap: remove some debug prints 4 years ago
Manos Pitsidianakis ddfadc748d
melib/imap: don't fetch RFC822 except when requested
In some cases when handling new server events, the entire body message
was unnecessarily fetched.

Closes #87 IMAP: don't fetch RFC822 except when requested
4 years ago
Manos Pitsidianakis 7a9c150f33
melib/imap: fetch References header along with ENVELOPE
Threading was broken if information was needed from References header.
For example, mailman might alter some Message-IDs when using its NNTP
bridge and the complete references are necessary to rebuild the thread,
which is only available in References whereas ENVELOPE has only
In-Reply-To.
4 years ago
Manos Pitsidianakis 2944fc992b
melib/imap/untagged: handle EXPUNGE if our MSNs invalid 4 years ago
Manos Pitsidianakis 535d04f4f0
melib/imap/untagged: lower mbox count on EXPUNGE events 4 years ago
Manos Pitsidianakis 5d968b7c40
imap: fix out of bounds panic on receive EXPUNGE
Closes #82
4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
Manos Pitsidianakis d00055fdb1
melib/imap: update online instant only on server read IO 4 years ago
Manos Pitsidianakis 927a0c3cc0
melib/imap: prevent panic in untagged fetch response 4 years ago
Manos Pitsidianakis b4fe34eacf
melib/imap: add ImapCache trait 4 years ago
Manos Pitsidianakis be2d268a20
melib/imap: build uid<>msn cache in {select,examine}_mailbox() 4 years ago
Manos Pitsidianakis 209bd98814
melib/imap: fix cache not being updated in some events 4 years ago
Manos Pitsidianakis f7c9f21575
melib/imap: add CONDSTORE support
Closes #52
4 years ago
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.
4 years ago
Manos Pitsidianakis 031e81ac8f
imap: add UntaggedResponse::UIDFetch 4 years ago
Manos Pitsidianakis 931863436d
imap: remove blocking imap backend, replace with async 4 years ago
Manos Pitsidianakis f8b84a192c
imap: add current_mailbox enum MailboxSelection
Add enum to track the currently selected Mailbox in the IMAP connection
4 years ago
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.
4 years ago
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
4 years ago
Manos Pitsidianakis d7444a5b19
imap: recognize EXPUNGE events 4 years ago
Manos Pitsidianakis 2d3f49d64d
imap: index by (MailboxHash, UID) instead of just UID
Mailboxes can share UIDs.
4 years ago
Manos Pitsidianakis 6ec249dd7f
melib: update nom dependency from 3.2.0 to 5.1.1
That was hecking exhausting
4 years ago
Manos Pitsidianakis 815ff98acc
imap: add smarter untagged reply detection 4 years ago