Commit Graph

511 Commits

Author SHA1 Message Date
Manos Pitsidianakis
42419327f8
imap_async: add operations 2020-07-06 15:13:01 +03:00
Manos Pitsidianakis
c82367e00d
BackendOp: Change set_{flag,tag} methods 2020-07-06 15:12:33 +03:00
Manos Pitsidianakis
8c1fc031e5
BackendOp: change fetch_flags retval to Result<Flag> 2020-07-06 15:12:11 +03:00
Manos Pitsidianakis
ee10cdbcd5
Make get_async() return a Stream 2020-07-06 15:12:11 +03:00
Manos Pitsidianakis
a38764f490
Add somewhat-working async IMAP backend 2020-07-06 15:12:05 +03:00
Manos Pitsidianakis
b72a1ca6d8
WIP maildir async 2020-07-06 15:08:32 +03:00
Manos Pitsidianakis
de201b5d6c
imap: create message_sequence cache
Close #45 (hopefully)
2020-07-06 11:38:15 +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
def3997d6f
email/parser.rs: replace "FIXME" errors 2020-06-26 21:12:57 +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
2a0ad92374
imap: don't send CRLF twice when sending LITERAL
This results in BAD IMAP errors, as a CRLF results in an empty command.
2020-06-23 20:11:04 +03:00
Manos Pitsidianakis
d7444a5b19
imap: recognize EXPUNGE events 2020-06-23 20:11:04 +03:00
Manos Pitsidianakis
efb06be09b
melib: return Result<_> from operation()
Envelope might have been deleted before main thread requests an
operation, which is a race condition.
2020-06-23 20:10:54 +03:00
Manos Pitsidianakis
d827ea1001
imap/connection.rs: debug print NO/BAD responses 2020-06-23 17:31:25 +03:00
Manos Pitsidianakis
fda947f8fb
imap.rs: fix two warnings 2020-06-23 17:31:25 +03:00
Manos Pitsidianakis
6f6f795fd5
imap: use uidnext for fetching all messages in get() 2020-06-23 12:37:27 +03:00
Manos Pitsidianakis
c08ceae97c
imap: add status_response() parser 2020-06-23 12:36:42 +03:00
Manos Pitsidianakis
c7835ccc13
imap: add mailbox_token() parser 2020-06-23 12:31:40 +03:00
Manos Pitsidianakis
c2300e8ea0
imap: update is_online flag on successful read/write 2020-06-23 12:30:10 +03:00
Manos Pitsidianakis
eca1921a8a
collection: add update_flags() method
On NewFlags events, the threads in Collection were not being updated, so
if an envelope's seen status was toggled the thread's unseen count was
  not updated, and thus not reflected in the UI even though the
  envelope's new flags event was registered properly.
2020-06-23 12:27:10 +03:00
Manos Pitsidianakis
cac21a279b
melib: Remove dead dependencies 2020-06-22 19:20:38 +03:00
Manos Pitsidianakis
01e1f4111c
imap: make hostname optional in ENVELOPE address parser 2020-06-22 17:27:48 +03:00
Manos Pitsidianakis
79b2e20557
imap: add message to Badcharset, Permanentflags responses 2020-06-22 17:26:20 +03:00
Manos Pitsidianakis
3703ae762e
imap: show reason for error on invalid uid fetch response 2020-06-22 17:25:49 +03:00
Manos Pitsidianakis
7d359624fe
imap: early return on empty mailbox in get() 2020-06-22 17:22:34 +03:00
Manos Pitsidianakis
af4ad19169
imap: add chain_err_summary error descriptions 2020-06-22 17:21:46 +03:00
Manos Pitsidianakis
ca11c8e474
Remove useless debug prints 2020-06-22 11:33:03 +03:00
Manos Pitsidianakis
34ed9e2014
conf: set mailbox autoload default to false 2020-06-22 11:31:43 +03:00
Manos Pitsidianakis
1db2c16f95
mbox: add support for multiple mbox mailboxes in config
Concerns #9
2020-06-20 14:49:02 +03:00
Manos Pitsidianakis
674073899d
mbox: Add different readers for mbox{o,rd,cl,cl2} 2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
01d83d8088
email/parser: do not set has_colon newline
When parsing a field-name, and expecting a colon (:) if a newline is
first encountered do not set `has_colon` flag to true.
2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
8bfdce6658
melib/error: do not discard old summary in set_summary 2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
75f9256a50
email/parser: change Error type to include error location
Add ParsingError type that includes a string with the location and
possibly an explanation for the error.
2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
40f66f3333
imap: modify connection timeouts 2020-06-11 12:00:07 +03:00
Manos Pitsidianakis
34d782f16f
imap: Remove panic from fetch_flags 2020-06-11 11:44:04 +03:00
Manos Pitsidianakis
c7fbc5cafb
imap: remove redundant passing of AccountHash 2020-06-11 11:43:18 +03:00
Manos Pitsidianakis
2d862e39f4
imap: off by one error in iteration 2020-06-11 11:42:02 +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
ca9d4fde58
Discard EnvelopeRename event if envelope is missing from Collection 2020-06-09 15:38:13 +03:00
Manos Pitsidianakis
f3d5edfe14
Add copy/move to other account operations 2020-06-08 22:11:43 +03:00
Manos Pitsidianakis
5435a4615e
imap: don't try to connect in is_online()
Attempting to connect to the server when calling imap's is_online()
blocks the UI process, so don't.
2020-06-07 14:35:41 +03:00
Manos Pitsidianakis
b4dfc1f89d
imap: add experimental header caching with sqlite3
Add support for header caching. It is currently unstable and should not
be used. It can be turned on by specifying "X_header_caching" to true in
the IMAP account's configuration.

The header cache is saved in a sqlite3 database in your XDG_DATA_DIR,
for example:

  /home/epilys/.local/share/meli/17328072387188469646_header_cache.db

Concerns #31 https://git.meli.delivery/meli/meli/issues/31
2020-06-07 14:35:20 +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
db4c401828
melib/error: add chain_err_summary() method 2020-06-06 12:27:02 +03:00
Manos Pitsidianakis
e4d4cd55d3
melib: skip mbox From header if present
mbox messages might end up in the parser by mistake, for example by
being present in a Maildir store.
2020-06-06 12:24:39 +03:00
Manos Pitsidianakis
8c1c628c2c
melib: fix non-unicode encode_header() char boundary issue 2020-06-05 10:56:35 +03:00
Manos Pitsidianakis
84976b1dc9
Update libloading dependency to 0.6.2 2020-06-05 10:56:35 +03:00
Manos Pitsidianakis
b3b9563db0
LineBreakCandidateIter: make iter non-recursive
A line with lots of graphemes without any breaks can overflow the stack,
so make the recursion into a loop.
2020-05-31 01:08:22 +03:00
Manos Pitsidianakis
6ceed3cae9
sqlite3: move module to melib 2020-05-30 15:37:12 +03:00