Commit Graph

42 Commits (a7e177586aa363e7dee2d5c311bb79d254d833ab)

Author SHA1 Message Date
Manos Pitsidianakis a7e177586a
Fix clippy lints 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis bbedeed3e3
More imap async fixes 2020-07-06 15:27:06 +03:00
Manos Pitsidianakis e06308fed2
MailBackend: change more methods to Futures 2020-07-06 15:26:00 +03:00
Manos Pitsidianakis d7444a5b19
imap: recognize EXPUNGE events 2020-06-23 20:11:04 +03:00
Manos Pitsidianakis fda947f8fb
imap.rs: fix two warnings 2020-06-23 17:31:25 +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 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 af4ad19169
imap: add chain_err_summary error descriptions 2020-06-22 17:21:46 +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 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 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 ca51077f53
imap: Add support for untagged FETCH (FLAG.. messages
IDLE connection can get untagged "* FETCH (FLAGS ({flag_list))" messages
if any client has changed flags. Support this refresh event.
2020-02-28 09:09:43 +02:00
Manos Pitsidianakis 33c1bf6558
Add consume newlines flag to phrase() 2020-02-26 15:53:46 +02:00
Manos Pitsidianakis 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
2020-02-26 10:54:10 +02:00
Manos Pitsidianakis f208948651
melib: add mailbox delete/create to IMAP 2020-02-08 23:54:14 +02:00
Manos Pitsidianakis 6a096dd405
Add missing copyright preambles 2020-01-31 03:54:58 +02:00
Manos Pitsidianakis 77d9cef6fc
melib/imap: small fixes
- Ignore final line ("M__ OK ...") when parsing FETCH response.

- Remove unnecessary import and reword some error messages
2020-01-27 15:55:01 +02:00
Manos Pitsidianakis 7f8c638361
melib/imap: add mailbox creation ability 2020-01-20 15:58:59 +02:00
Manos Pitsidianakis ca7d72e732
melib: Replace String with Cow<'static, str> 2020-01-07 12:55:27 +02:00
Manos Pitsidianakis 21526b5faf
melib: make Work use FnOnce closures
There was no need to use Fn() instead of FnOnce()
2019-12-20 00:53:43 +02:00
Manos Pitsidianakis 9211913405
meli/backends: honor mailbox subscriptions in IMAP/JMAP 2019-12-18 15:44:44 +02:00
Manos Pitsidianakis 2b6f6ab42c
melib: Add BackendFolder methods, move special usage logic to backend
- add count() method to return (unseen, total) counts
- add is_subscribed()
- add set_special_usage() and set_is_subscribed()

concerns #8
2019-12-18 08:58:49 +02:00
Manos Pitsidianakis 7732b851e6
melib: fix minor header parsing errors
- set_subject checked if last byte was control character instead of last
character. Characters can be multi-byte, duh.
- email::parser::date didn't provide for Date values that had -0000
instead of +0000 (that's a chrono requirement/bug)
2019-12-12 00:44:47 +02:00
Manos Pitsidianakis f05a4205f7
melib/ui: small fixes
- melib/imap: accept quoted strings with escaped quotes in
protocol_parser
- ui/accounts: return unavailabity correctly if folder's worker slot is
empty instead of judging only by its vacancy
- ui/MailView: set view as not dirty if envelope loading from backend
fails so that it stops requesting it in every subsequent redraw
2019-12-11 00:17:11 +02:00
Manos Pitsidianakis 6f76cd9acc
melib: add special_usage() method to BackendFolder
Eventually after loading potential usage values from configuration,
backends will be able to change the usage values themselves. IMAP and
JMAP have the ability to set Mailbox roles (IMAP needs LIST-SPECIAL
extension
2019-12-11 00:15:36 +02:00
Manos Pitsidianakis 504b658f68
melib/imap: add UidFetchResponse struct and parser
Add handwritten parser for UID FETCH responses and use it for all UID
FETCH calls.
2019-12-11 00:05:41 +02:00
Manos Pitsidianakis 569127fac5
melib/imap: detect untagged CAPABILITY responses
Gmail sends an untagged CAPABILITY response before accepting login, so
be smarter when logging in
2019-12-11 00:01:22 +02:00
Manos Pitsidianakis a20e08eb43
imap: treat \NoSelect mailboxes as empty
\NoSelect are mailboxes that can't be selected, thus treat them as if
they are empty.
2019-12-10 23:54:19 +02:00
Manos Pitsidianakis 0eaf17871a
melib: add set_tags command in BackendOp 2019-12-08 11:25:54 +02:00
Manos Pitsidianakis dab9b39f4d
melib/imap: detect tag (\* flag) support 2019-12-07 17:17:08 +02:00
Manos Pitsidianakis 05d9ca6e0d
small fixes 2019-11-21 15:44:18 +02:00
Manos Pitsidianakis fc2d9a684d
melib/imap: set has_attachments based on BODYSTRUCTURE
fetch BODYSTRUCTURE along with ENVELOPE from server and set
has_attachments based on the MIME structure of the envelope.

Notes: BODYSTRUCTURE returns the MIME structure of the envelope without
the data, so if it includes a multipart/mixed it *should* have
attachments.
ENVELOPE returns basic headers of the message like Sender, Subject, Date
etc.
2019-11-18 13:00:43 +02:00
Manos Pitsidianakis 7463248da8
melib: change BackendOp::set_flag() signature 2019-11-15 21:32:55 +02:00
Manos Pitsidianakis 5761f854e2
melib: Add FolderPermissions
permissions() method on BackendFolder and SetPermissions in
FolderOperation enum.
2019-11-11 00:47:23 +02:00
Manos Pitsidianakis c1902f96b5
imap: add UIDVALIDITY check
On UIDVALIDITY change, discard cache and force rescan.
2019-11-10 23:02:23 +02:00
Matthias Beyer a0602274f8
Run cargo fmt 2019-10-04 20:47:25 +03:00
Manos Pitsidianakis d1d11356db
imap: get() ENVELOPE instead of RFC822.HEADER; it's faster 2019-09-15 13:21:14 +03:00
Manos Pitsidianakis 0812242f60
Add IMAP backend
TODOs: new message events (untagged responses)
2019-09-15 13:21:13 +03:00