Commit graph

36 commits

Author SHA1 Message Date
Lu Fennell
8147f17296 Improve error message for ValidationError
In addition to the invalid character, the error now also contains a
`command_synopsis` and `argument` which identifies the command and
argument that failed to validate.
2021-11-10 10:12:03 +01:00
mordak
d8d69a363b
Idle builder (#202) 2021-05-26 21:55:42 -04:00
mordak
b7a2641725
Change "tls" feature to "native-tls" (#201)
Change "tls" feature to "native-tls" for clarity and obvious distinction with rustls-tls.
2021-05-24 21:46:49 -04:00
mordak
7204697dd9
Add ClientBuilder helper to make setting up TLS connections easy. (#197)
Also replaces connect() and connect_starttls() with ClientBuilder.
2021-05-10 22:39:46 -04:00
mordak
c443a3ab5d
Fix doc warnings. (#198) 2021-05-07 22:07:34 -04:00
Clément DOUIN
2898e19530
RFC 5256 - SORT command (#180) 2021-04-19 23:03:23 -04:00
Todd Mortimer
08de3362b4 Move debug assertion. 2021-04-08 20:08:51 -04:00
Todd Mortimer
4232c773b5 wait to wait_while 2021-04-08 19:50:20 -04:00
Todd Mortimer
692dcdd27e Move buffer management into parse match arms. 2021-04-07 21:18:17 -04:00
Todd Mortimer
7eb2cfde74 Use bool instead of CallbackAction. 2021-04-07 19:45:04 -04:00
Todd Mortimer
11adcfc97b Tweak to how we handle incomplete parse. 2021-04-06 22:41:41 -04:00
Todd Mortimer
9126d3c15b Improve documentation around unhandled responses.
UnsolicitedResponse is not exhaustive, and open an issue if you find one
that isn't handled.
2021-04-06 21:54:52 -04:00
Todd Mortimer
ff39ebf58d Merge branch 'idle-responses' of github.com:mordak/rust-imap into idle-responses 2021-04-05 16:12:47 -04:00
Todd Mortimer
064c2e08dc Use drain() instead of reallocating. 2021-04-05 16:10:32 -04:00
Todd Mortimer
bb38142ab3 Change callback_stop to stop_on_any. 2021-04-05 15:29:56 -04:00
Todd Mortimer
bbff7d45b8 Remove deprecated wait_timeout() 2021-04-05 15:27:20 -04:00
mordak
c9b7c0a3e6
Update src/extensions/idle.rs
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
2021-04-05 07:03:06 -05:00
Todd Mortimer
529401a36d Implement a method to pass unilateral responses while IDLE.
While IDLE, the server sends unilateral responses to notify the client of
changes to the mailbox as they happen. Instead of always exiting the IDLE
on any change, allow the caller to pass a callback function which receives
the messages and returns an action to either Continue IDLE or Stop and exit.

For clients wishing to use the previous behaviour, a callback_stop convenience
function is provided that terminates the IDLE on any change to the mailbox.
2021-03-28 15:27:39 -04:00
Todd Mortimer
d0e61c73e9 Appease clippy. 2021-03-20 14:26:52 -04:00
Todd Mortimer
ec835d67e4 Rename handle_unilateral to try_handle_unilateral.
More accurately conveys that the function might not actually handle it.
2021-03-20 14:21:13 -04:00
Jon Gjengset
7860b14088 Revert "Release first 3.0.0 alpha"
This reverts commit 8490407d2e.
2021-03-06 15:35:00 -08:00
Jon Gjengset
8490407d2e Release first 3.0.0 alpha 2021-03-06 15:34:42 -08:00
Jon Gjengset
9b78550394 Adopt latest imap_proto and expose error status codes 2021-03-06 14:53:14 -08:00
Jon Gjengset
abf820bfb9 Much better metadata docs 2021-03-06 10:54:22 -08:00
Jon Gjengset
6fbbcb88f3 Fix up metadata depth enum 2021-03-06 09:51:18 -08:00
Jon Gjengset
9a24ca4125 Fix compile with newer imap_proto 2021-03-06 09:48:11 -08:00
sergey
a29b6f0cce Adding METADATA support 2020-05-19 15:58:43 +03:00
Massimo Redaelli
80a0aae69d Support timing out wait on IDLE 2020-05-12 09:53:13 +02:00
Todd Mortimer
746bdfe6b9 Handle Dovecot's periodic IDLE notification messages ("OK Still here").
These messages show up at an interval controlled by Dovecot's
imap_idle_notify_interval setting, which defaults to 2 minutes.
These messages were causing the IDLE loop to exit prematurely
because it looks like a notification response from the server.
2020-04-19 10:25:41 -04:00
Bryce Fisher-Fleig
f15bdfb458 (feat) default feature for native_tls (aka openssl)
Establishes conditional compilation for all integration with the
native_tls crate in this crate. Since native_tls has been deeply
integrated into this crate for a long time, we want to maintain
backwards compatibility by making this feature part of the default.

For a consumer of this crate to "opt-out", including this in
cargo.toml:

```
[dependencies.imap]
version = 0.16.0        # Replace this with the correct version
default-features = false
```

See the conversation on Github for details on this approach:
https://github.com/jonhoo/rust-imap/issues/123
2019-09-24 08:13:17 -07:00
Jon Gjengset
2aa8c87e35
Move to 2018 edition 2019-09-03 09:35:15 -04:00
Jon Gjengset
0250e3e2b2
Make clippy happy again 2019-06-28 17:41:29 -04:00
Jon Gjengset
b6e9ea080b
Make crate compile on Rust 1.26.2+ 2018-11-24 14:17:15 -05:00
Jon Gjengset
bce4831ccb
Clippy clean 2018-11-22 14:27:07 -05:00
Jon Gjengset
5dd9dfe469
Even more doc updates 2018-11-22 14:00:58 -05:00
Jon Gjengset
f83742dc3d
A significant documentation upgrade
Fixes #77.
Touches on #74.
Fixes #70 through documentation (I think?)
Fixes #62.
2018-11-21 16:37:47 -05:00