Commit Graph

104 Commits (9a29f4245f32e8e7e463926d2a5fe66c5fd161aa)

Author SHA1 Message Date
Manos Pitsidianakis 9a29f4245f
melib/imap: add COMPRESS=DEFLATE support
Closes #53
2020-07-28 17:39:25 +03:00
Manos Pitsidianakis 8ec0da4fbd
melib/imap: add conf toggle flags for IMAP extensions 2020-07-27 15:06:57 +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 f41a1ffe3a
imap: remove FLAGS.SILENT from STOREs
Flag updates were not received, because FLAGS.SILENT was used.
2020-07-26 16:09:41 +03:00
Manos Pitsidianakis 3f8aa560f0
melib/MailBackend: add MailBackendCapabilities struct 2020-07-25 17:53:04 +03:00
Manos Pitsidianakis 5a5408ecd5
imap: small fixes 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis 00acba7717
melib/MailBackend: add copy_messages,set_flags,delete_messages methods 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis 1b8529c59c
melib/imap: use LITERAL+ with APPEND
Closes #50
2020-07-25 15:17:35 +03:00
Manos Pitsidianakis 0ee3a0bf79
imap: clear mesage totals when fetching entire mailbox
Totals might have been set after a STATUS response, meaning we know the
totals without knowing exactly what message UIDs are there. Clear the
totals, and start inserting UIDs instead.
2020-07-23 13:23:24 +03:00
Manos Pitsidianakis 6121f77853
imap: support LIST-STATUS 2020-07-23 13:23:24 +03:00
Manos Pitsidianakis 350c8033b1
imap: use ImapLineIterator in imap_mailboxes() 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis b9343dfb32
imap: update supported capabilities 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis fadb3634e0
melib: take MailboxHash instead of &Mailbox in fetch*() 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis 9103d05617
melib: s/get/fetch in MailBackend methods 2020-07-18 12:34:13 +03:00
Manos Pitsidianakis 0a7f283582
imap: prevent deadlock in watch::examine_updates
uid_store.mailboxes was locked before calling examine_updates, which
calls examine_mailbox() which also attempts to lock uid_store.mailboxes
2020-07-17 22:45:25 +03:00
Manos Pitsidianakis 32f196143e
melib: add supports_search() method to MailBackend 2020-07-17 00:02:02 +03:00
Manos Pitsidianakis 931863436d
imap: remove blocking imap backend, replace with async 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis b5748c247a
MailBackend: remove connect() method 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis 231471fa8c
MailBackend: add is_{async,online} methods 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis 94e0aa4fe7
MailBackend: change get() ret type to Result<_> 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis a7e177586a
Fix clippy lints 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis e06308fed2
MailBackend: change more methods to Futures 2020-07-06 15:26:00 +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 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 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 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 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 40f66f3333
imap: modify connection timeouts 2020-06-11 12:00:07 +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 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 815ff98acc
imap: add smarter untagged reply detection 2020-05-30 14:43:44 +03:00
Manos Pitsidianakis e4a1ab8a09
Fix rustfmt suggestions 2020-05-29 20:43:39 +03:00
Manos Pitsidianakis bd404e6937
Execute user shell commands with /bin/sh
Execute user provided command invocations $CMD such as `editor_cmd` with
`/bin/sh` as `/bin/sh -c "$CMD"

Previously, user commands were split by whitespace which must trigger
erroneous behavior if quotes are involved.
2020-05-28 21:02:49 +03:00
Manos Pitsidianakis 8648b229ad
Add AccountHash to RefreshEvent
Different accounts might have same inboxes with same MailboxHashes. Use
the hash of the account's name to differentiate.
2020-05-10 22:10:17 +03:00
Manos Pitsidianakis eb701695f7
Remove fnv crate 2020-05-10 21:18:56 +03:00
Manos Pitsidianakis e9a935dbf7
melib: add search method in mail backends 2020-04-05 15:57:05 +03:00
Manos Pitsidianakis c37d8bd331
imap: add mutex timeout lock and remove unwraps 2020-04-05 15:56:59 +03:00
Manos Pitsidianakis a8c1016f37
Add various logic checks 2020-03-12 09:47:39 +02:00
Manos Pitsidianakis 6ca8c3b964
imap: add server_password_command 2020-03-12 09:45:18 +02:00
Manos Pitsidianakis 6079909f9c
imap: add managesieve connection
So far only the connection is implemented, and using the
testing/manage_sieve binary you can get a shell to a managesieve server.

The managesieve interface will be used in the UI from a plugin, but the
plugin's interface isn't implemented yet.
2020-02-28 15:47:07 +02:00
Manos Pitsidianakis 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
2020-02-26 10:54:10 +02:00