Commit graph

385 commits

Author SHA1 Message Date
Jon Gjengset
de796b2d39
Bump version for new, richer wait_with_timeout 2020-05-12 08:43:05 -04:00
Jon Gjengset
3db3e8b69e
Bump outdated dev-dep 2020-05-12 08:42:32 -04:00
Jon Gjengset
2639a1df63
Fix BSD ci 2020-05-12 08:41:12 -04:00
Jon Gjengset
c2062a5f07
Merge pull request #159 from mredaelli/master
Support timing out wait on IDLE
2020-05-12 08:40:39 -04:00
Massimo Redaelli
80a0aae69d Support timing out wait on IDLE 2020-05-12 09:53:13 +02:00
Jon Gjengset
22f9ba0ddf
Bump version for Dovecot IDLE fix 2020-04-20 10:32:12 -04:00
Jon Gjengset
d6f6615935
Merge pull request #160 from mordak/idle-ok-still-here
Handle Dovecot's periodic IDLE notification messages ("OK Still here").
2020-04-20 10:31:33 -04: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
Jon Gjengset
1b7ba0b0b1
Bump version for new Error impls (#158) 2020-03-30 09:37:17 -04:00
Jon Gjengset
e417c526b0
Bump dependencies 2020-03-30 09:36:36 -04:00
Jon Gjengset
f0908029c4
Merge pull request #158 from mordak/error-display
Make Display implementation independent of Error::description
2020-03-30 09:35:05 -04:00
Jon Gjengset
0961ffc1b8
Allow errors on nightly 2020-03-30 09:34:20 -04:00
Todd Mortimer
41c0eb91d6 Make Display implementation independent of deprecated Error::description.
Allow use of deprecated in existing Error::description implementation to
suppress warnings.
2020-03-29 19:27:07 -04:00
Jon Gjengset
94327c4e02
Merge pull request #156 from jonhoo/breaking-release
Prepare breaking release (2.0)
2020-02-20 13:06:48 -05:00
Jon Gjengset
3a594e1ce6
Bump version for breaking release
This includes the imap-proto 0.11 `&str` -> `&[u8]` change, and the
`Capability` changes in imap-proto 0.10 (and #133).
2020-02-20 12:50:22 -05:00
Jon Gjengset
949ea3bd6b
Bump dependencies
This also pulls in imap-proto 0.11, which exposes message envelopes as
`&[u8]` instead of `&str`. This directly affects our public API.
2020-02-20 12:49:25 -05:00
Jon Gjengset
3ee0952723
Merge pull request #154 from dmeijboom/master
When authenticating using SASL XAUTH2 with Gmail fails
2020-02-20 12:37:30 -05:00
Dillen Meijboom
391caf042a
Ignore server comments 2020-02-20 17:22:53 +01:00
Jon Gjengset
71b60dbb3a
Merge pull request #155 from jonhoo/fix-ci
Fix CI
2020-02-20 10:41:16 -05:00
Jon Gjengset
39f93ca05f
Fix up CI to use new fancy Azure Pipelines CI 2020-02-20 10:29:00 -05:00
Jon Gjengset
031233ab59
Merge pull request #153 from Celti/starttls
Add `imap::connect_starttls` convenience function
2019-11-30 11:22:17 -05:00
Celti Burroughs
a4b03568be
Add imap::connect_starttls convenience function
Add a `imap::connect_starttls` convenience function, with the same
syntax as `imap::connect`, to make STARTTLS connections as easily as
IMAPS.

PR#140 removed `imap::connect_insecure` with the stated goal of
encouraging users to connect securely. With that change, users are
forced to construct their own `TcpStream`s when interacting with
non-IMAPS servers.

This change may perversely incentivise the use of insecure connections,
instead of discouraging them, as users may blindly copy-paste code
involving `Client::new` and `TcpStream`s so things "just work", without
the visual indicator of `_insecure` suggesting something is wrong.

Tangentially, [RFC 2595] encourages using STARTTLS instead of raw SSL
sockets. Ideally, we should support both options equally well.

[RFC 2595]: https://tools.ietf.org/html/rfc2595#section-7
2019-11-30 05:18:05 -07:00
Jon Gjengset
271599bb78
Merge pull request #150 from open-xchange/body-structure-exposure-merge
Add bodystructure exposing function to Fetch structure.
2019-10-29 09:54:42 -04:00
sergey
18526ffb61 Add bodystructure exposing function to Fetch structure. 2019-10-29 13:55:07 +02:00
Friedel Ziegelmayer
465481de88 fix(auth): handle single + response (#145) 2019-10-21 10:49:15 -04:00
Friedel Ziegelmayer
0e5aa5c004 feat: expose read_greeting (#144)
This is sometimes needed when manually using `Client::new()`.

We enforce that the greeting is read at most once.
2019-10-21 10:13:39 -04:00
Jon Gjengset
3eebdca788
Merge pull request #147 from Lem/fix_typ_status
Fix typo in documentation
2019-10-18 14:58:42 -04:00
Lem
39b8087b3c
Update src/client.rs
Fix typo in fix for typo.

It's not 'data_times' or 'data_itmes'. It should be 'data_items'!

Co-Authored-By: Jon Gjengset <jon@thesquareplanet.com>
2019-10-18 20:31:34 +02:00
Lemm
e41b235387 Fix typo in documentation
data_times should be data_items for
function "status"
2019-10-18 20:23:10 +02:00
Jon Gjengset
7aa5aa7edb
Merge pull request #140 from brycefisher/feat/cargo-feature-nativetls
(feature) Allow opt-out from `native_tls` crate
2019-09-24 19:20:34 -04:00
Bryce Fisher-Fleig
6fcc189d11 (nit) cargo fmt 2019-09-24 08:13:17 -07:00
Bryce Fisher-Fleig
97671062ee (doc) Explain how and why to opt out of native_tls
Also point out the examples/rustlts.rs file for pure Rust TLS goodness
2019-09-24 08:13:17 -07:00
Bryce Fisher-Fleig
29fece1221 (security) Remove connect_insecure
In order to discourage folks from connecting securely, we're removing the
convenience method imap::connect_insecure.

Fear not\! For those who manage security in another way (aka a private network
or similar measures), it is still possible to connect without TLS by using the
imap::Client::new() method. See that method for examples of how to do this.
2019-09-24 08:13:17 -07: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
c8288ea19b
Merge pull request #138 from brycefisher/feat/rustls-support
(feat) Provide example integration with Rustls crate
2019-09-18 12:23:31 -04:00
Bryce Fisher-Fleig
76bcf02997 Remove unnecessary dotenv dependency 2019-09-18 09:04:01 -07:00
Bryce Fisher-Fleig
6f9b66b927 FIXUP - bump compiler version to support ring
The underlying Rust library for crypto `ring` using multiple
`#[cfg_attr()]` properties together which stabilized in rust 1.33.0:
https://github.com/rust-lang/rust/blob/stable/RELEASES.md#language-4

Previously, everything else in this could be compiled with rust 1.32.0,
so this may constitute a breaking change.
2019-09-17 22:21:09 -07:00
Bryce Fisher-Fleig
e3123476f5 (nit) Cargo fmt 2019-09-17 20:14:29 -07:00
Bryce Fisher-Fleig
beb41d2f52 (feat) Provide example integration with Rustls crate
By checking this code in as an example, we can prevent bitrot as we continuously test this
in CI. It also demonstrates how to setup TLS without relying on platform specific dependencies
via native_tls crate.
2019-09-17 12:51:38 -07:00
Jon Gjengset
281d2eb8ab
Merge pull request #137 from link2xt/imap4rev1-case
Update imap-proto and test that "IMAP4REV1" capability is accepted
2019-09-04 11:23:19 -04:00
Alexander Krotov
2221cd2e18
Update imap-proto and test that "IMAP4REV1" capability is accepted
See issue https://github.com/djc/tokio-imap/issues/54
2019-09-04 18:08:12 +03:00
Jon Gjengset
6c9611ff3a
Merge pull request #136 from avitex/master
Make capabilities has_str case insensitive
2019-09-04 09:23:09 -04:00
avitex
c5f4495be7
Make capabilities has_str case insensitive 2019-09-04 20:25:51 +10:00
Jon Gjengset
8ac9f8d079
Just comment it out 2019-09-03 12:16:36 -04:00
Jon Gjengset
5de7a70fc8
Don't run coverage for now
We need https://github.com/greenmail-mail-test/greenmail/issues/284 to
be resolved first, because native-tls uses an up-to-date openssl
version, which rejects Greenmail's cert
2019-09-03 12:14:37 -04:00
Jon Gjengset
533d2dd5f9
Move off of travis 2019-09-03 11:52:01 -04:00
Jon Gjengset
7fabf34c22
Move to Azure Pipelines 2019-09-03 11:51:46 -04:00
Jon Gjengset
f55674b522
Make it actually compile 2019-09-03 11:51:38 -04:00
Jon Gjengset
a1bc689504
Maybe make coverage tests work? 2019-09-03 11:48:59 -04:00
Jon Gjengset
fd5d76391d
YAML whitespace 2019-09-03 11:18:43 -04:00