aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock927
-rw-r--r--Cargo.toml4
-rw-r--r--aero-dav/src/caldecoder.rs10
-rw-r--r--aero-dav/src/calencoder.rs8
-rw-r--r--aero-dav/src/decoder.rs15
-rw-r--r--aero-dav/src/lib.rs1
-rw-r--r--aero-dav/src/realization.rs4
-rw-r--r--aero-proto/Cargo.toml35
-rw-r--r--aero-proto/src/dav.rs (renamed from aero-proto/dav.rs)11
-rw-r--r--aero-proto/src/imap/attributes.rs (renamed from aero-proto/imap/attributes.rs)0
-rw-r--r--aero-proto/src/imap/capability.rs (renamed from aero-proto/imap/capability.rs)0
-rw-r--r--aero-proto/src/imap/command/anonymous.rs (renamed from aero-proto/imap/command/anonymous.rs)5
-rw-r--r--aero-proto/src/imap/command/anystate.rs (renamed from aero-proto/imap/command/anystate.rs)0
-rw-r--r--aero-proto/src/imap/command/authenticated.rs (renamed from aero-proto/imap/command/authenticated.rs)15
-rw-r--r--aero-proto/src/imap/command/mod.rs (renamed from aero-proto/imap/command/mod.rs)2
-rw-r--r--aero-proto/src/imap/command/selected.rs (renamed from aero-proto/imap/command/selected.rs)5
-rw-r--r--aero-proto/src/imap/flags.rs (renamed from aero-proto/imap/flags.rs)0
-rw-r--r--aero-proto/src/imap/flow.rs (renamed from aero-proto/imap/flow.rs)3
-rw-r--r--aero-proto/src/imap/imf_view.rs (renamed from aero-proto/imap/imf_view.rs)0
-rw-r--r--aero-proto/src/imap/index.rs (renamed from aero-proto/imap/index.rs)4
-rw-r--r--aero-proto/src/imap/mail_view.rs (renamed from aero-proto/imap/mail_view.rs)2
-rw-r--r--aero-proto/src/imap/mailbox_view.rs (renamed from aero-proto/imap/mailbox_view.rs)12
-rw-r--r--aero-proto/src/imap/mime_view.rs (renamed from aero-proto/imap/mime_view.rs)2
-rw-r--r--aero-proto/src/imap/mod.rs (renamed from aero-proto/imap/mod.rs)12
-rw-r--r--aero-proto/src/imap/request.rs (renamed from aero-proto/imap/request.rs)0
-rw-r--r--aero-proto/src/imap/response.rs (renamed from aero-proto/imap/response.rs)0
-rw-r--r--aero-proto/src/imap/search.rs (renamed from aero-proto/imap/search.rs)3
-rw-r--r--aero-proto/src/imap/session.rs (renamed from aero-proto/imap/session.rs)8
-rw-r--r--aero-proto/src/lib.rs6
-rw-r--r--aero-proto/src/lmtp.rs (renamed from aero-proto/lmtp.rs)14
-rw-r--r--aero-proto/src/sasl.rs (renamed from aero-proto/sasl.rs)6
-rw-r--r--aero-sasl/src/flow.rs8
32 files changed, 991 insertions, 131 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 387615f..32b798c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,10 +3,19 @@
version = 3
[[package]]
+name = "abnf-core"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec182d1f071b906a9f59269c89af101515a5cbe58f723eb6717e7fe7445c0dea"
+dependencies = [
+ "nom 7.1.3",
+]
+
+[[package]]
name = "addr2line"
-version = "0.21.0"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a"
dependencies = [
"gimli",
]
@@ -63,6 +72,37 @@ dependencies = [
]
[[package]]
+name = "aero-proto"
+version = "0.3.0"
+dependencies = [
+ "aero-collections",
+ "aero-dav",
+ "aero-sasl",
+ "aero-user",
+ "anyhow",
+ "async-trait",
+ "base64 0.21.7",
+ "chrono",
+ "duplexify",
+ "eml-codec",
+ "futures",
+ "http-body-util",
+ "hyper 1.2.0",
+ "hyper-util",
+ "imap-codec",
+ "imap-flow",
+ "rustls 0.22.2",
+ "rustls-pemfile 2.1.1",
+ "smtp-message",
+ "smtp-server",
+ "thiserror",
+ "tokio",
+ "tokio-rustls 0.25.0",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
name = "aero-sasl"
version = "0.3.0"
dependencies = [
@@ -158,6 +198,12 @@ dependencies = [
]
[[package]]
+name = "arrayvec"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
+
+[[package]]
name = "asn1-rs"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -197,6 +243,208 @@ dependencies = [
]
[[package]]
+name = "async-channel"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35"
+dependencies = [
+ "concurrent-queue",
+ "event-listener 2.5.3",
+ "futures-core",
+]
+
+[[package]]
+name = "async-channel"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3"
+dependencies = [
+ "concurrent-queue",
+ "event-listener 5.2.0",
+ "event-listener-strategy 0.5.0",
+ "futures-core",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
+name = "async-executor"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c"
+dependencies = [
+ "async-lock 3.3.0",
+ "async-task",
+ "concurrent-queue",
+ "fastrand 2.0.1",
+ "futures-lite 2.2.0",
+ "slab",
+]
+
+[[package]]
+name = "async-fs"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06"
+dependencies = [
+ "async-lock 2.8.0",
+ "autocfg",
+ "blocking",
+ "futures-lite 1.13.0",
+]
+
+[[package]]
+name = "async-global-executor"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c"
+dependencies = [
+ "async-channel 2.2.0",
+ "async-executor",
+ "async-io 2.3.1",
+ "async-lock 3.3.0",
+ "blocking",
+ "futures-lite 2.2.0",
+ "once_cell",
+]
+
+[[package]]
+name = "async-io"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
+dependencies = [
+ "async-lock 2.8.0",
+ "autocfg",
+ "cfg-if",
+ "concurrent-queue",
+ "futures-lite 1.13.0",
+ "log",
+ "parking",
+ "polling 2.8.0",
+ "rustix 0.37.27",
+ "slab",
+ "socket2 0.4.10",
+ "waker-fn",
+]
+
+[[package]]
+name = "async-io"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65"
+dependencies = [
+ "async-lock 3.3.0",
+ "cfg-if",
+ "concurrent-queue",
+ "futures-io",
+ "futures-lite 2.2.0",
+ "parking",
+ "polling 3.5.0",
+ "rustix 0.38.31",
+ "slab",
+ "tracing",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "async-lock"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b"
+dependencies = [
+ "event-listener 2.5.3",
+]
+
+[[package]]
+name = "async-lock"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b"
+dependencies = [
+ "event-listener 4.0.3",
+ "event-listener-strategy 0.4.0",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
+name = "async-net"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f"
+dependencies = [
+ "async-io 1.13.0",
+ "blocking",
+ "futures-lite 1.13.0",
+]
+
+[[package]]
+name = "async-process"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88"
+dependencies = [
+ "async-io 1.13.0",
+ "async-lock 2.8.0",
+ "async-signal",
+ "blocking",
+ "cfg-if",
+ "event-listener 3.1.0",
+ "futures-lite 1.13.0",
+ "rustix 0.38.31",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "async-signal"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5"
+dependencies = [
+ "async-io 2.3.1",
+ "async-lock 2.8.0",
+ "atomic-waker",
+ "cfg-if",
+ "futures-core",
+ "futures-io",
+ "rustix 0.38.31",
+ "signal-hook-registry",
+ "slab",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "async-std"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
+dependencies = [
+ "async-channel 1.9.0",
+ "async-global-executor",
+ "async-io 1.13.0",
+ "async-lock 2.8.0",
+ "crossbeam-utils",
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-lite 1.13.0",
+ "gloo-timers",
+ "kv-log-macro",
+ "log",
+ "memchr",
+ "once_cell",
+ "pin-project-lite 0.2.13",
+ "pin-utils",
+ "slab",
+ "wasm-bindgen-futures",
+]
+
+[[package]]
+name = "async-task"
+version = "4.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799"
+
+[[package]]
name = "async-trait"
version = "0.1.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -208,6 +456,46 @@ dependencies = [
]
[[package]]
+name = "atomic-waker"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
+
+[[package]]
+name = "auto_enums"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe0dfe45d75158751e195799f47ea02e81f570aa24bc5ef999cdd9e888c4b5c3"
+dependencies = [
+ "auto_enums_core",
+ "auto_enums_derive",
+]
+
+[[package]]
+name = "auto_enums_core"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da47c46001293a2c4b744d731958be22cff408a2ab76e2279328f9713b1267b4"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "auto_enums_derive"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41aed1da83ecdc799503b7cb94da1b45a34d72b49caf40a61d9cf5b88ec07cfd"
+dependencies = [
+ "autocfg",
+ "derive_utils",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -232,7 +520,7 @@ dependencies = [
"aws-smithy-types",
"aws-types",
"bytes",
- "fastrand",
+ "fastrand 2.0.1",
"hex",
"http 0.2.12",
"hyper 0.14.28",
@@ -270,11 +558,11 @@ dependencies = [
"aws-smithy-types",
"aws-types",
"bytes",
- "fastrand",
+ "fastrand 2.0.1",
"http 0.2.12",
"http-body 0.4.6",
"percent-encoding",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"tracing",
"uuid",
]
@@ -433,7 +721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf7f09a27286d84315dfb9346208abb3b0973a692454ae6d0bc8d803fcce3b4"
dependencies = [
"futures-util",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"tokio",
]
@@ -452,7 +740,7 @@ dependencies = [
"http 0.2.12",
"http-body 0.4.6",
"md-5",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"sha1",
"sha2",
"tracing",
@@ -485,7 +773,7 @@ dependencies = [
"http-body 0.4.6",
"once_cell",
"percent-encoding",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"pin-utils",
"tracing",
]
@@ -520,14 +808,14 @@ dependencies = [
"aws-smithy-runtime-api",
"aws-smithy-types",
"bytes",
- "fastrand",
+ "fastrand 2.0.1",
"h2 0.3.24",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.28",
"hyper-rustls 0.24.2",
"once_cell",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"pin-utils",
"rustls 0.21.10",
"tokio",
@@ -545,7 +833,7 @@ dependencies = [
"bytes",
"http 0.2.12",
"http 1.1.0",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"tokio",
"tracing",
"zeroize",
@@ -565,7 +853,7 @@ dependencies = [
"http-body 0.4.6",
"itoa",
"num-integer",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"pin-utils",
"ryu",
"serde",
@@ -600,9 +888,9 @@ dependencies = [
[[package]]
name = "backtrace"
-version = "0.3.69"
+version = "0.3.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"
dependencies = [
"addr2line",
"cc",
@@ -654,6 +942,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
+name = "bitflags"
+version = "2.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
+
+[[package]]
name = "bitmaps"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -663,6 +957,18 @@ dependencies = [
]
[[package]]
+name = "bitvec"
+version = "0.19.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33"
+dependencies = [
+ "funty",
+ "radium",
+ "tap",
+ "wyz",
+]
+
+[[package]]
name = "blake2"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -681,6 +987,42 @@ dependencies = [
]
[[package]]
+name = "blocking"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118"
+dependencies = [
+ "async-channel 2.2.0",
+ "async-lock 3.3.0",
+ "async-task",
+ "fastrand 2.0.1",
+ "futures-io",
+ "futures-lite 2.2.0",
+ "piper",
+ "tracing",
+]
+
+[[package]]
+name = "bounded-static"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2325bd33fa7e3018e7e37f5b0591ba009124963b5a3f8b7cae6d0a8c1028ed4"
+dependencies = [
+ "bounded-static-derive",
+]
+
+[[package]]
+name = "bounded-static-derive"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f10dd247355bf631d98d2753d87ae62c84c8dcb996ad9b24a4168e0aec29bd6b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
+]
+
+[[package]]
name = "bumpalo"
version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -739,6 +1081,15 @@ dependencies = [
]
[[package]]
+name = "concurrent-queue"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
name = "const-oid"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -788,6 +1139,12 @@ dependencies = [
]
[[package]]
+name = "crossbeam-utils"
+version = "0.8.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
+
+[[package]]
name = "crypto-bigint"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -870,6 +1227,17 @@ dependencies = [
]
[[package]]
+name = "derive_utils"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "532b4c15dccee12c7044f1fcad956e98410860b22231e44a3b827464797ca7bf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -892,6 +1260,16 @@ dependencies = [
]
[[package]]
+name = "duplexify"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1cc346cd6db38ceab2d33f59b26024c3ddb8e75f047c6cafbcbc016ea8065d5"
+dependencies = [
+ "async-std",
+ "pin-project-lite 0.1.12",
+]
+
+[[package]]
name = "ecdsa"
version = "0.14.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -966,6 +1344,84 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
+name = "errno"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "event-listener"
+version = "2.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
+
+[[package]]
+name = "event-listener"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2"
+dependencies = [
+ "concurrent-queue",
+ "parking",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
+name = "event-listener"
+version = "4.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e"
+dependencies = [
+ "concurrent-queue",
+ "parking",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
+name = "event-listener"
+version = "5.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91"
+dependencies = [
+ "concurrent-queue",
+ "parking",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
+name = "event-listener-strategy"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3"
+dependencies = [
+ "event-listener 4.0.3",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
+name = "event-listener-strategy"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291"
+dependencies = [
+ "event-listener 5.2.0",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
+name = "fastrand"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
+dependencies = [
+ "instant",
+]
+
+[[package]]
name = "fastrand"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -997,6 +1453,12 @@ dependencies = [
]
[[package]]
+name = "funty"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
+
+[[package]]
name = "futures"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1045,6 +1507,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
[[package]]
+name = "futures-lite"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
+dependencies = [
+ "fastrand 1.9.0",
+ "futures-core",
+ "futures-io",
+ "memchr",
+ "parking",
+ "pin-project-lite 0.2.13",
+ "waker-fn",
+]
+
+[[package]]
+name = "futures-lite"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba"
+dependencies = [
+ "fastrand 2.0.1",
+ "futures-core",
+ "futures-io",
+ "parking",
+ "pin-project-lite 0.2.13",
+]
+
+[[package]]
name = "futures-macro"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1080,7 +1570,7 @@ dependencies = [
"futures-sink",
"futures-task",
"memchr",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"pin-utils",
"slab",
]
@@ -1108,9 +1598,21 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.28.1"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
+
+[[package]]
+name = "gloo-timers"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "js-sys",
+ "wasm-bindgen",
+]
[[package]]
name = "group"
@@ -1218,7 +1720,7 @@ checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
"bytes",
"http 0.2.12",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
]
[[package]]
@@ -1241,7 +1743,7 @@ dependencies = [
"futures-util",
"http 1.1.0",
"http-body 1.0.0",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
]
[[package]]
@@ -1272,8 +1774,8 @@ dependencies = [
"httparse",
"httpdate",
"itoa",
- "pin-project-lite",
- "socket2",
+ "pin-project-lite 0.2.13",
+ "socket2 0.5.5",
"tokio",
"tower-service",
"tracing",
@@ -1295,7 +1797,7 @@ dependencies = [
"httparse",
"httpdate",
"itoa",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"smallvec",
"tokio",
"want",
@@ -1348,8 +1850,8 @@ dependencies = [
"http 1.1.0",
"http-body 1.0.0",
"hyper 1.2.0",
- "pin-project-lite",
- "socket2",
+ "pin-project-lite 0.2.13",
+ "socket2 0.5.5",
"tokio",
"tower",
"tower-service",
@@ -1381,6 +1883,17 @@ dependencies = [
[[package]]
name = "idna"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
+dependencies = [
+ "matches",
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "idna"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
@@ -1404,6 +1917,46 @@ dependencies = [
]
[[package]]
+name = "imap-codec"
+version = "2.0.0"
+source = "git+https://github.com/superboum/imap-codec?branch=custom/aerogramme#d8a5afc03fb771232e94c73af6a05e79dc80bbed"
+dependencies = [
+ "abnf-core",
+ "base64 0.21.7",
+ "bounded-static",
+ "chrono",
+ "imap-types",
+ "log",
+ "nom 7.1.3",
+ "thiserror",
+]
+
+[[package]]
+name = "imap-flow"
+version = "0.1.0"
+source = "git+https://github.com/duesee/imap-flow.git?branch=main#dce759a8531f317e8d7311fb032b366db6698e38"
+dependencies = [
+ "bounded-static",
+ "bytes",
+ "imap-codec",
+ "imap-types",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "imap-types"
+version = "2.0.0"
+source = "git+https://github.com/superboum/imap-codec?branch=custom/aerogramme#d8a5afc03fb771232e94c73af6a05e79dc80bbed"
+dependencies = [
+ "base64 0.21.7",
+ "bounded-static",
+ "chrono",
+ "thiserror",
+]
+
+[[package]]
name = "indexmap"
version = "2.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1414,6 +1967,26 @@ dependencies = [
]
[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "io-lifetimes"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
name = "itoa"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1461,6 +2034,15 @@ dependencies = [
]
[[package]]
+name = "kv-log-macro"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
+dependencies = [
+ "log",
+]
+
+[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1505,6 +2087,19 @@ dependencies = [
]
[[package]]
+name = "lexical-core"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
+dependencies = [
+ "arrayvec",
+ "bitflags 1.3.2",
+ "cfg-if",
+ "ryu",
+ "static_assertions",
+]
+
+[[package]]
name = "libc"
version = "0.2.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1534,10 +2129,31 @@ dependencies = [
]
[[package]]
+name = "linux-raw-sys"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
+
+[[package]]
name = "log"
version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+dependencies = [
+ "value-bag",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
[[package]]
name = "md-5"
@@ -1551,9 +2167,9 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.7.1"
+version = "2.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
[[package]]
name = "minimal-lexical"
@@ -1563,11 +2179,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.7.1"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
dependencies = [
"adler",
+ "autocfg",
]
[[package]]
@@ -1589,6 +2206,19 @@ checksum = "cf51a729ecf40266a2368ad335a5fdde43471f545a967109cd62146ecf8b66ff"
[[package]]
name = "nom"
+version = "6.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6a7a9657c84d5814c6196b68bb4429df09c18b1573806259fba397ea4ad0d44"
+dependencies = [
+ "bitvec",
+ "funty",
+ "lexical-core",
+ "memchr",
+ "version_check",
+]
+
+[[package]]
+name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
@@ -1639,12 +2269,9 @@ dependencies = [
[[package]]
name = "object"
-version = "0.32.2"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
-dependencies = [
- "memchr",
-]
+checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
[[package]]
name = "oid-registry"
@@ -1685,6 +2312,12 @@ dependencies = [
]
[[package]]
+name = "parking"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
+
+[[package]]
name = "password-hash"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1729,6 +2362,12 @@ dependencies = [
[[package]]
name = "pin-project-lite"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777"
+
+[[package]]
+name = "pin-project-lite"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
@@ -1740,6 +2379,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
+name = "piper"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4"
+dependencies = [
+ "atomic-waker",
+ "fastrand 2.0.1",
+ "futures-io",
+]
+
+[[package]]
name = "pkcs8"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1756,6 +2406,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
[[package]]
+name = "polling"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce"
+dependencies = [
+ "autocfg",
+ "bitflags 1.3.2",
+ "cfg-if",
+ "concurrent-queue",
+ "libc",
+ "log",
+ "pin-project-lite 0.2.13",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "polling"
+version = "3.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9"
+dependencies = [
+ "cfg-if",
+ "concurrent-queue",
+ "pin-project-lite 0.2.13",
+ "rustix 0.38.31",
+ "tracing",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
name = "powerfmt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1796,6 +2476,12 @@ dependencies = [
]
[[package]]
+name = "radium"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8"
+
+[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1835,12 +2521,27 @@ dependencies = [
]
[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax",
+]
+
+[[package]]
name = "regex-lite"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e"
[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
name = "rfc6979"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1927,6 +2628,33 @@ dependencies = [
]
[[package]]
+name = "rustix"
+version = "0.37.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2"
+dependencies = [
+ "bitflags 1.3.2",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys 0.3.8",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"
+dependencies = [
+ "bitflags 2.4.2",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.4.13",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
name = "rustls"
version = "0.20.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2089,7 +2817,7 @@ version = "2.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"core-foundation",
"core-foundation-sys",
"libc",
@@ -2210,6 +2938,71 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
[[package]]
+name = "smol"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1"
+dependencies = [
+ "async-channel 1.9.0",
+ "async-executor",
+ "async-fs",
+ "async-io 1.13.0",
+ "async-lock 2.8.0",
+ "async-net",
+ "async-process",
+ "blocking",
+ "futures-lite 1.13.0",
+]
+
+[[package]]
+name = "smtp-message"
+version = "0.1.0"
+source = "git+http://github.com/Alexis211/kannader?branch=feature/lmtp#0560e7c46af752344a3095add5f84b02400b1111"
+dependencies = [
+ "auto_enums",
+ "futures",
+ "idna 0.2.3",
+ "lazy_static",
+ "nom 6.2.2",
+ "pin-project",
+ "regex-automata",
+ "serde",
+]
+
+[[package]]
+name = "smtp-server"
+version = "0.1.0"
+source = "git+http://github.com/Alexis211/kannader?branch=feature/lmtp#0560e7c46af752344a3095add5f84b02400b1111"
+dependencies = [
+ "async-trait",
+ "chrono",
+ "duplexify",
+ "futures",
+ "smol",
+ "smtp-message",
+ "smtp-server-types",
+]
+
+[[package]]
+name = "smtp-server-types"
+version = "0.1.0"
+source = "git+http://github.com/Alexis211/kannader?branch=feature/lmtp#0560e7c46af752344a3095add5f84b02400b1111"
+dependencies = [
+ "serde",
+ "smtp-message",
+]
+
+[[package]]
+name = "socket2"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
name = "socket2"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2254,6 +3047,12 @@ dependencies = [
]
[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
name = "subtle"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2294,6 +3093,12 @@ dependencies = [
]
[[package]]
+name = "tap"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
+
+[[package]]
name = "thiserror"
version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2368,9 +3173,9 @@ dependencies = [
"libc",
"mio",
"num_cpus",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"signal-hook-registry",
- "socket2",
+ "socket2 0.5.5",
"tokio-macros",
"windows-sys 0.48.0",
]
@@ -2425,7 +3230,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
dependencies = [
"futures-core",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"tokio",
]
@@ -2439,7 +3244,7 @@ dependencies = [
"futures-core",
"futures-io",
"futures-sink",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"tokio",
"tracing",
]
@@ -2462,7 +3267,7 @@ dependencies = [
"futures-core",
"futures-util",
"pin-project",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"tokio",
"tower-layer",
"tower-service",
@@ -2488,7 +3293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
"log",
- "pin-project-lite",
+ "pin-project-lite 0.2.13",
"tracing-attributes",
"tracing-core",
]
@@ -2571,7 +3376,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
dependencies = [
"form_urlencoded",
- "idna",
+ "idna 0.5.0",
"percent-encoding",
]
@@ -2588,6 +3393,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
[[package]]
+name = "value-bag"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b"
+
+[[package]]
name = "version_check"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2600,6 +3411,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"
[[package]]
+name = "waker-fn"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690"
+
+[[package]]
name = "walkdir"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2650,6 +3467,18 @@ dependencies = [
]
[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
name = "wasm-bindgen-macro"
version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2871,6 +3700,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
[[package]]
+name = "wyz"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
+
+[[package]]
name = "x509-parser"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2928,13 +3763,3 @@ dependencies = [
"cc",
"libc",
]
-
-[[patch.unused]]
-name = "imap-codec"
-version = "2.0.0"
-source = "git+https://github.com/superboum/imap-codec?branch=custom/aerogramme#d8a5afc03fb771232e94c73af6a05e79dc80bbed"
-
-[[patch.unused]]
-name = "imap-types"
-version = "2.0.0"
-source = "git+https://github.com/superboum/imap-codec?branch=custom/aerogramme#d8a5afc03fb771232e94c73af6a05e79dc80bbed"
diff --git a/Cargo.toml b/Cargo.toml
index 5654322..406d5bd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,7 +7,7 @@ members = [
"aero-dav",
"aero-dav/fuzz",
"aero-collections",
-# "aero-proto",
+ "aero-proto",
# "aerogramme",
]
@@ -20,7 +20,7 @@ aero-bayou = { version = "0.3.0", path = "aero-bayou" }
aero-sasl = { version = "0.3.0", path = "aero-sasl" }
aero-dav = { version = "0.3.0", path = "aero-dav" }
aero-collections = { version = "0.3.0", path = "aero-collections" }
-#aero-proto = { version = "0.3.0", path = "aero-proto" }
+aero-proto = { version = "0.3.0", path = "aero-proto" }
#aerogramme = { version = "0.3.0", path = "aerogramme" }
# async runtime
diff --git a/aero-dav/src/caldecoder.rs b/aero-dav/src/caldecoder.rs
index 5f40c4b..fb840d6 100644
--- a/aero-dav/src/caldecoder.rs
+++ b/aero-dav/src/caldecoder.rs
@@ -1,4 +1,4 @@
-use super::types as dav;
+//use super::types as dav;
use super::caltypes::*;
use super::xml;
use super::error;
@@ -7,25 +7,25 @@ use super::error;
// ---- EXTENSIONS ---
impl xml::QRead<Violation> for Violation {
- async fn qread(xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
+ async fn qread(_xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
unreachable!();
}
}
impl xml::QRead<Property> for Property {
- async fn qread(xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
+ async fn qread(_xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
unreachable!();
}
}
impl xml::QRead<PropertyRequest> for PropertyRequest {
- async fn qread(xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
+ async fn qread(_xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
unreachable!();
}
}
impl xml::QRead<ResourceType> for ResourceType {
- async fn qread(xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
+ async fn qread(_xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
unreachable!();
}
}
diff --git a/aero-dav/src/calencoder.rs b/aero-dav/src/calencoder.rs
index ff6eb24..67892ed 100644
--- a/aero-dav/src/calencoder.rs
+++ b/aero-dav/src/calencoder.rs
@@ -1,7 +1,5 @@
use quick_xml::Error as QError;
-use quick_xml::events::{Event, BytesEnd, BytesStart, BytesText};
-use quick_xml::name::PrefixDeclaration;
-use tokio::io::AsyncWrite;
+use quick_xml::events::{Event, BytesText};
use super::caltypes::*;
use super::xml::{Node, QWrite, IWrite, Writer};
@@ -627,7 +625,7 @@ impl QWrite for ParamFilterMatch {
impl QWrite for TimeZone {
async fn qwrite(&self, xml: &mut Writer<impl IWrite>) -> Result<(), QError> {
- let mut start = xml.create_cal_element("timezone");
+ let start = xml.create_cal_element("timezone");
let end = start.to_end();
xml.q.write_event_async(Event::Start(start.clone())).await?;
@@ -638,7 +636,7 @@ impl QWrite for TimeZone {
impl QWrite for Filter {
async fn qwrite(&self, xml: &mut Writer<impl IWrite>) -> Result<(), QError> {
- let mut start = xml.create_cal_element("filter");
+ let start = xml.create_cal_element("filter");
let end = start.to_end();
xml.q.write_event_async(Event::Start(start.clone())).await?;
diff --git a/aero-dav/src/decoder.rs b/aero-dav/src/decoder.rs
index 65cb712..02bc376 100644
--- a/aero-dav/src/decoder.rs
+++ b/aero-dav/src/decoder.rs
@@ -1,14 +1,9 @@
-use std::future::Future;
-
use quick_xml::events::Event;
-use quick_xml::events::attributes::AttrError;
-use quick_xml::name::{Namespace, QName, PrefixDeclaration, ResolveResult, ResolveResult::*};
-use quick_xml::reader::NsReader;
-use tokio::io::AsyncBufRead;
+use chrono::DateTime;
use super::types::*;
use super::error::ParsingError;
-use super::xml::{Node, QRead, Reader, IRead, DAV_URN, CAL_URN};
+use super::xml::{Node, QRead, Reader, IRead, DAV_URN};
//@TODO (1) Rewrite all objects as Href,
// where we return Ok(None) instead of trying to find the object at any cost.
@@ -119,7 +114,7 @@ impl QRead<LockInfo> for LockInfo {
impl<E: Extension> QRead<PropValue<E>> for PropValue<E> {
async fn qread(xml: &mut Reader<impl IRead>) -> Result<Self, ParsingError> {
xml.open(DAV_URN, "prop").await?;
- let mut acc = xml.collect::<Property<E>>().await?;
+ let acc = xml.collect::<Property<E>>().await?;
xml.close().await?;
Ok(PropValue(acc))
}
@@ -352,8 +347,6 @@ impl<E: Extension> QRead<PropertyRequest<E>> for PropertyRequest<E> {
impl<E: Extension> QRead<Property<E>> for Property<E> {
async fn qread(xml: &mut Reader<impl IRead>) -> Result<Self, ParsingError> {
- use chrono::{DateTime, FixedOffset, TimeZone};
-
// Core WebDAV properties
if xml.maybe_open(DAV_URN, "creationdate").await?.is_some() {
let datestr = xml.tag_string().await?;
@@ -592,7 +585,7 @@ impl QRead<LockType> for LockType {
impl QRead<Href> for Href {
async fn qread(xml: &mut Reader<impl IRead>) -> Result<Self, ParsingError> {
xml.open(DAV_URN, "href").await?;
- let mut url = xml.tag_string().await?;
+ let url = xml.tag_string().await?;
xml.close().await?;
Ok(Href(url))
}
diff --git a/aero-dav/src/lib.rs b/aero-dav/src/lib.rs
index 6bfbf62..0ca8243 100644
--- a/aero-dav/src/lib.rs
+++ b/aero-dav/src/lib.rs
@@ -1,5 +1,4 @@
#![feature(type_alias_impl_trait)]
-#![feature(async_fn_in_trait)]
#![feature(async_closure)]
#![feature(trait_alias)]
diff --git a/aero-dav/src/realization.rs b/aero-dav/src/realization.rs
index 33a556e..5781637 100644
--- a/aero-dav/src/realization.rs
+++ b/aero-dav/src/realization.rs
@@ -6,12 +6,12 @@ use super::error;
#[derive(Debug, PartialEq)]
pub struct Disabled(());
impl xml::QRead<Disabled> for Disabled {
- async fn qread(xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
+ async fn qread(_xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> {
Err(error::ParsingError::Recoverable)
}
}
impl xml::QWrite for Disabled {
- async fn qwrite(&self, xml: &mut xml::Writer<impl xml::IWrite>) -> Result<(), quick_xml::Error> {
+ async fn qwrite(&self, _xml: &mut xml::Writer<impl xml::IWrite>) -> Result<(), quick_xml::Error> {
unreachable!();
}
}
diff --git a/aero-proto/Cargo.toml b/aero-proto/Cargo.toml
new file mode 100644
index 0000000..df8c696
--- /dev/null
+++ b/aero-proto/Cargo.toml
@@ -0,0 +1,35 @@
+[package]
+name = "aero-proto"
+version = "0.3.0"
+authors = ["Alex Auvolat <alex@adnab.me>", "Quentin Dufour <quentin@dufour.io>"]
+edition = "2021"
+license = "EUPL-1.2"
+description = "Binding between Aerogramme's internal components and well-known protocols"
+
+[dependencies]
+aero-sasl.workspace = true
+aero-dav.workspace = true
+aero-user.workspace = true
+aero-collections.workspace = true
+
+async-trait.workspace = true
+anyhow.workspace = true
+hyper.workspace = true
+base64.workspace = true
+hyper-util.workspace = true
+http-body-util.workspace = true
+futures.workspace = true
+tokio.workspace = true
+tokio-util.workspace = true
+tokio-rustls.workspace = true
+rustls.workspace = true
+rustls-pemfile.workspace = true
+imap-codec.workspace = true
+imap-flow.workspace = true
+chrono.workspace = true
+eml-codec.workspace = true
+thiserror.workspace = true
+duplexify.workspace = true
+smtp-message.workspace = true
+smtp-server.workspace = true
+tracing.workspace = true
diff --git a/aero-proto/dav.rs b/aero-proto/src/dav.rs
index fa2023a..2852d34 100644
--- a/aero-proto/dav.rs
+++ b/aero-proto/src/dav.rs
@@ -11,9 +11,9 @@ use futures::stream::{FuturesUnordered, StreamExt};
use tokio::net::TcpListener;
use tokio::sync::watch;
-use crate::config::DavUnsecureConfig;
-use crate::login::ArcLoginProvider;
-use crate::user::User;
+use aero_user::config::DavUnsecureConfig;
+use aero_user::login::ArcLoginProvider;
+use aero_collections::user::User;
pub struct Server {
bind_addr: SocketAddr,
@@ -110,7 +110,7 @@ async fn auth(
// Call login provider
let creds = match login.login(username, password).await {
Ok(c) => c,
- Err(e) => return Ok(Response::builder()
+ Err(_) => return Ok(Response::builder()
.status(401)
.body(Full::new(Bytes::from("Wrong credentials")))?),
};
@@ -140,6 +140,7 @@ async fn router(user: std::sync::Arc<User>, req: Request<impl hyper::body::Body>
Ok(Response::new(Full::new(Bytes::from("Hello World!"))))
}
-async fn collections(user: std::sync::Arc<User>, req: Request<impl hyper::body::Body>) -> Result<Response<Full<Bytes>>> {
+#[allow(dead_code)]
+async fn collections(_user: std::sync::Arc<User>, _req: Request<impl hyper::body::Body>) -> Result<Response<Full<Bytes>>> {
unimplemented!();
}
diff --git a/aero-proto/imap/attributes.rs b/aero-proto/src/imap/attributes.rs
index 89446a8..89446a8 100644
--- a/aero-proto/imap/attributes.rs
+++ b/aero-proto/src/imap/attributes.rs
diff --git a/aero-proto/imap/capability.rs b/aero-proto/src/imap/capability.rs
index c76b51c..c76b51c 100644
--- a/aero-proto/imap/capability.rs
+++ b/aero-proto/src/imap/capability.rs
diff --git a/aero-proto/imap/command/anonymous.rs b/aero-proto/src/imap/command/anonymous.rs
index 811d1e4..2848c30 100644
--- a/aero-proto/imap/command/anonymous.rs
+++ b/aero-proto/src/imap/command/anonymous.rs
@@ -4,12 +4,13 @@ use imap_codec::imap_types::core::AString;
use imap_codec::imap_types::response::Code;
use imap_codec::imap_types::secret::Secret;
+use aero_user::login::ArcLoginProvider;
+use aero_collections::user::User;
+
use crate::imap::capability::ServerCapability;
use crate::imap::command::anystate;
use crate::imap::flow;
use crate::imap::response::Response;
-use crate::login::ArcLoginProvider;
-use crate::user::User;
//--- dispatching
diff --git a/aero-proto/imap/command/anystate.rs b/aero-proto/src/imap/command/anystate.rs
index 718ba3f..718ba3f 100644
--- a/aero-proto/imap/command/anystate.rs
+++ b/aero-proto/src/imap/command/anystate.rs
diff --git a/aero-proto/imap/command/authenticated.rs b/aero-proto/src/imap/command/authenticated.rs
index 3d332ec..4c8d8c1 100644
--- a/aero-proto/imap/command/authenticated.rs
+++ b/aero-proto/src/imap/command/authenticated.rs
@@ -14,17 +14,16 @@ use imap_codec::imap_types::mailbox::{ListMailbox, Mailbox as MailboxCodec};
use imap_codec::imap_types::response::{Code, CodeOther, Data};
use imap_codec::imap_types::status::{StatusDataItem, StatusDataItemName};
+use aero_collections::mail::uidindex::*;
+use aero_collections::user::User;
+use aero_collections::mail::IMF;
+use aero_collections::mail::namespace::MAILBOX_HIERARCHY_DELIMITER as MBX_HIER_DELIM_RAW;
+
use crate::imap::capability::{ClientCapability, ServerCapability};
use crate::imap::command::{anystate, MailboxName};
use crate::imap::flow;
-use crate::imap::mailbox_view::{MailboxView, UpdateParameters};
+use crate::imap::mailbox_view::MailboxView;
use crate::imap::response::Response;
-use crate::imap::Body;
-
-use crate::mail::uidindex::*;
-use crate::user::User;
-use crate::mail::IMF;
-use crate::mail::namespace::MAILBOX_HIERARCHY_DELIMITER as MBX_HIER_DELIM_RAW;
pub struct AuthenticatedContext<'a> {
pub req: &'a Command<'static>,
@@ -611,7 +610,7 @@ impl<'a> AuthenticatedContext<'a> {
Some(mb) => mb,
None => bail!("Mailbox does not exist"),
};
- let mut view = MailboxView::new(mb, self.client_capabilities.condstore.is_enabled()).await;
+ let view = MailboxView::new(mb, self.client_capabilities.condstore.is_enabled()).await;
if date.is_some() {
tracing::warn!("Cannot set date when appending message");
diff --git a/aero-proto/imap/command/mod.rs b/aero-proto/src/imap/command/mod.rs
index f201eb6..5382d06 100644
--- a/aero-proto/imap/command/mod.rs
+++ b/aero-proto/src/imap/command/mod.rs
@@ -3,7 +3,7 @@ pub mod anystate;
pub mod authenticated;
pub mod selected;
-use crate::mail::namespace::INBOX;
+use aero_collections::mail::namespace::INBOX;
use imap_codec::imap_types::mailbox::Mailbox as MailboxCodec;
/// Convert an IMAP mailbox name/identifier representation
diff --git a/aero-proto/imap/command/selected.rs b/aero-proto/src/imap/command/selected.rs
index eedfbd6..190949b 100644
--- a/aero-proto/imap/command/selected.rs
+++ b/aero-proto/src/imap/command/selected.rs
@@ -3,7 +3,7 @@ use std::sync::Arc;
use anyhow::Result;
use imap_codec::imap_types::command::{Command, CommandBody, FetchModifier, StoreModifier};
-use imap_codec::imap_types::core::{Charset, Vec1};
+use imap_codec::imap_types::core::Charset;
use imap_codec::imap_types::fetch::MacroOrMessageDataItemNames;
use imap_codec::imap_types::flag::{Flag, StoreResponse, StoreType};
use imap_codec::imap_types::mailbox::Mailbox as MailboxCodec;
@@ -11,13 +11,14 @@ use imap_codec::imap_types::response::{Code, CodeOther};
use imap_codec::imap_types::search::SearchKey;
use imap_codec::imap_types::sequence::SequenceSet;
+use aero_collections::user::User;
+
use crate::imap::attributes::AttributesProxy;
use crate::imap::capability::{ClientCapability, ServerCapability};
use crate::imap::command::{anystate, authenticated, MailboxName};
use crate::imap::flow;
use crate::imap::mailbox_view::{MailboxView, UpdateParameters};
use crate::imap::response::Response;
-use crate::user::User;
pub struct SelectedContext<'a> {
pub req: &'a Command<'static>,
diff --git a/aero-proto/imap/flags.rs b/aero-proto/src/imap/flags.rs
index 0f6ec64..0f6ec64 100644
--- a/aero-proto/imap/flags.rs
+++ b/aero-proto/src/imap/flags.rs
diff --git a/aero-proto/imap/flow.rs b/aero-proto/src/imap/flow.rs
index 86eb12e..1986447 100644
--- a/aero-proto/imap/flow.rs
+++ b/aero-proto/src/imap/flow.rs
@@ -5,8 +5,9 @@ use std::sync::Arc;
use imap_codec::imap_types::core::Tag;
use tokio::sync::Notify;
+use aero_collections::user::User;
+
use crate::imap::mailbox_view::MailboxView;
-use crate::user::User;
#[derive(Debug)]
pub enum Error {
diff --git a/aero-proto/imap/imf_view.rs b/aero-proto/src/imap/imf_view.rs
index a4ca2e8..a4ca2e8 100644
--- a/aero-proto/imap/imf_view.rs
+++ b/aero-proto/src/imap/imf_view.rs
diff --git a/aero-proto/imap/index.rs b/aero-proto/src/imap/index.rs
index 9b794b8..3de46be 100644
--- a/aero-proto/imap/index.rs
+++ b/aero-proto/src/imap/index.rs
@@ -3,8 +3,8 @@ use std::num::{NonZeroU32, NonZeroU64};
use anyhow::{anyhow, Result};
use imap_codec::imap_types::sequence::{SeqOrUid, Sequence, SequenceSet};
-use crate::mail::uidindex::{ImapUid, ModSeq, UidIndex};
-use crate::mail::unique_ident::UniqueIdent;
+use aero_collections::mail::uidindex::{ImapUid, ModSeq, UidIndex};
+use aero_collections::mail::unique_ident::UniqueIdent;
pub struct Index<'a> {
pub imap_index: Vec<MailIndex<'a>>,
diff --git a/aero-proto/imap/mail_view.rs b/aero-proto/src/imap/mail_view.rs
index a8db733..054014a 100644
--- a/aero-proto/imap/mail_view.rs
+++ b/aero-proto/src/imap/mail_view.rs
@@ -16,7 +16,7 @@ use eml_codec::{
part::{composite::Message, AnyPart},
};
-use crate::mail::query::QueryResult;
+use aero_collections::mail::query::QueryResult;
use crate::imap::attributes::AttributesProxy;
use crate::imap::flags;
diff --git a/aero-proto/imap/mailbox_view.rs b/aero-proto/src/imap/mailbox_view.rs
index 1c53b93..5154359 100644
--- a/aero-proto/imap/mailbox_view.rs
+++ b/aero-proto/src/imap/mailbox_view.rs
@@ -6,18 +6,18 @@ use anyhow::{anyhow, Error, Result};
use futures::stream::{StreamExt, TryStreamExt};
-use imap_codec::imap_types::core::{Charset, Vec1};
+use imap_codec::imap_types::core::Charset;
use imap_codec::imap_types::fetch::MessageDataItem;
use imap_codec::imap_types::flag::{Flag, FlagFetch, FlagPerm, StoreResponse, StoreType};
use imap_codec::imap_types::response::{Code, CodeOther, Data, Status};
use imap_codec::imap_types::search::SearchKey;
use imap_codec::imap_types::sequence::SequenceSet;
-use crate::mail::mailbox::Mailbox;
-use crate::mail::query::QueryScope;
-use crate::mail::snapshot::FrozenMailbox;
-use crate::mail::uidindex::{ImapUid, ImapUidvalidity, ModSeq};
-use crate::mail::unique_ident::UniqueIdent;
+use aero_collections::mail::mailbox::Mailbox;
+use aero_collections::mail::query::QueryScope;
+use aero_collections::mail::snapshot::FrozenMailbox;
+use aero_collections::mail::uidindex::{ImapUid, ImapUidvalidity, ModSeq};
+use aero_collections::mail::unique_ident::UniqueIdent;
use crate::imap::attributes::AttributesProxy;
use crate::imap::flags;
diff --git a/aero-proto/imap/mime_view.rs b/aero-proto/src/imap/mime_view.rs
index 8bbbd2d..720f20a 100644
--- a/aero-proto/imap/mime_view.rs
+++ b/aero-proto/src/imap/mime_view.rs
@@ -384,6 +384,8 @@ impl<'a> NodeMsg<'a> {
})
}
}
+
+#[allow(dead_code)]
struct NodeMult<'a>(&'a NodeMime<'a>, &'a composite::Multipart<'a>);
impl<'a> NodeMult<'a> {
fn structure(&self, is_ext: bool) -> Result<BodyStructure<'static>> {
diff --git a/aero-proto/imap/mod.rs b/aero-proto/src/imap/mod.rs
index 02ab9ce..ae3b58f 100644
--- a/aero-proto/imap/mod.rs
+++ b/aero-proto/src/imap/mod.rs
@@ -15,13 +15,11 @@ mod session;
use std::net::SocketAddr;
-use anyhow::{anyhow, bail, Context, Result};
+use anyhow::{anyhow, bail, Result};
use futures::stream::{FuturesUnordered, StreamExt};
-
use tokio::net::TcpListener;
use tokio::sync::mpsc;
use tokio::sync::watch;
-
use imap_codec::imap_types::response::{Code, CommandContinuationRequest, Response, Status};
use imap_codec::imap_types::{core::Text, response::Greeting};
use imap_flow::server::{ServerFlow, ServerFlowEvent, ServerFlowOptions};
@@ -29,12 +27,13 @@ use imap_flow::stream::AnyStream;
use rustls_pemfile::{certs, private_key};
use tokio_rustls::TlsAcceptor;
-use crate::config::{ImapConfig, ImapUnsecureConfig};
+use aero_user::config::{ImapConfig, ImapUnsecureConfig};
+use aero_user::login::ArcLoginProvider;
+
use crate::imap::capability::ServerCapability;
use crate::imap::request::Request;
use crate::imap::response::{Body, ResponseOrIdle};
use crate::imap::session::Instance;
-use crate::login::ArcLoginProvider;
/// Server is a thin wrapper to register our Services in BàL
pub struct Server {
@@ -140,7 +139,6 @@ impl Server {
use std::sync::Arc;
use tokio::sync::mpsc::*;
use tokio::sync::Notify;
-use tokio_util::bytes::BytesMut;
const PIPELINABLE_COMMANDS: usize = 64;
@@ -325,8 +323,6 @@ impl NetLoop {
self.server.enqueue_status(Status::bye(None, "Internal session exited").unwrap());
tracing::error!("session task exited for {:?}, quitting", self.ctx.addr);
},
- Some(_) => unreachable!(),
-
},
// When receiving a CTRL+C
diff --git a/aero-proto/imap/request.rs b/aero-proto/src/imap/request.rs
index cff18a3..cff18a3 100644
--- a/aero-proto/imap/request.rs
+++ b/aero-proto/src/imap/request.rs
diff --git a/aero-proto/imap/response.rs b/aero-proto/src/imap/response.rs
index b6a0e98..b6a0e98 100644
--- a/aero-proto/imap/response.rs
+++ b/aero-proto/src/imap/response.rs
diff --git a/aero-proto/imap/search.rs b/aero-proto/src/imap/search.rs
index 37a7e9e..3634a3a 100644
--- a/aero-proto/imap/search.rs
+++ b/aero-proto/src/imap/search.rs
@@ -4,9 +4,10 @@ use imap_codec::imap_types::core::Vec1;
use imap_codec::imap_types::search::{MetadataItemSearch, SearchKey};
use imap_codec::imap_types::sequence::{SeqOrUid, Sequence, SequenceSet};
+use aero_collections::mail::query::QueryScope;
+
use crate::imap::index::MailIndex;
use crate::imap::mail_view::MailView;
-use crate::mail::query::QueryScope;
pub enum SeqType {
Undefined,
diff --git a/aero-proto/imap/session.rs b/aero-proto/src/imap/session.rs
index fa3232a..92b5eb6 100644
--- a/aero-proto/imap/session.rs
+++ b/aero-proto/src/imap/session.rs
@@ -1,11 +1,13 @@
+use anyhow::{anyhow, bail, Context, Result};
+use imap_codec::imap_types::{command::Command, core::Tag};
+
+use aero_user::login::ArcLoginProvider;
+
use crate::imap::capability::{ClientCapability, ServerCapability};
use crate::imap::command::{anonymous, authenticated, selected};
use crate::imap::flow;
use crate::imap::request::Request;
use crate::imap::response::{Response, ResponseOrIdle};
-use crate::login::ArcLoginProvider;
-use anyhow::{anyhow, bail, Context, Result};
-use imap_codec::imap_types::{command::Command, core::Tag};
//-----
pub struct Instance {
diff --git a/aero-proto/src/lib.rs b/aero-proto/src/lib.rs
new file mode 100644
index 0000000..d5154cd
--- /dev/null
+++ b/aero-proto/src/lib.rs
@@ -0,0 +1,6 @@
+#![feature(async_closure)]
+
+pub mod dav;
+pub mod imap;
+pub mod lmtp;
+pub mod sasl;
diff --git a/aero-proto/lmtp.rs b/aero-proto/src/lmtp.rs
index dcd4bcc..9d40296 100644
--- a/aero-proto/lmtp.rs
+++ b/aero-proto/src/lmtp.rs
@@ -10,18 +10,16 @@ use futures::{
stream::{FuturesOrdered, FuturesUnordered},
StreamExt,
};
-use log::*;
use tokio::net::TcpListener;
use tokio::select;
use tokio::sync::watch;
use tokio_util::compat::*;
-
use smtp_message::{DataUnescaper, Email, EscapedDataReader, Reply, ReplyCode};
use smtp_server::{reply, Config, ConnectionMetadata, Decision, MailMetadata};
-use crate::config::*;
-use crate::login::*;
-use crate::mail::incoming::EncryptedMessage;
+use aero_user::config::*;
+use aero_user::login::*;
+use aero_collections::mail::incoming::EncryptedMessage;
pub struct LmtpServer {
bind_addr: SocketAddr,
@@ -43,7 +41,7 @@ impl LmtpServer {
pub async fn run(self: &Arc<Self>, mut must_exit: watch::Receiver<bool>) -> Result<()> {
let tcp = TcpListener::bind(self.bind_addr).await?;
- info!("LMTP server listening on {:#}", self.bind_addr);
+ tracing::info!("LMTP server listening on {:#}", self.bind_addr);
let mut connections = FuturesUnordered::new();
@@ -60,7 +58,7 @@ impl LmtpServer {
_ = wait_conn_finished => continue,
_ = must_exit.changed() => continue,
};
- info!("LMTP: accepted connection from {}", remote_addr);
+ tracing::info!("LMTP: accepted connection from {}", remote_addr);
let conn = tokio::spawn(smtp_server::interact(
socket.compat(),
@@ -73,7 +71,7 @@ impl LmtpServer {
}
drop(tcp);
- info!("LMTP server shutting down, draining remaining connections...");
+ tracing::info!("LMTP server shutting down, draining remaining connections...");
while connections.next().await.is_some() {}
Ok(())
diff --git a/aero-proto/sasl.rs b/aero-proto/src/sasl.rs
index fe292e1..dae89eb 100644
--- a/aero-proto/sasl.rs
+++ b/aero-proto/src/sasl.rs
@@ -6,10 +6,11 @@ use tokio::io::BufStream;
use tokio::io::{AsyncBufReadExt, AsyncWriteExt};
use tokio::net::{TcpListener, TcpStream};
use tokio::sync::watch;
+use tokio_util::bytes::BytesMut;
use aero_user::config::AuthConfig;
use aero_user::login::ArcLoginProvider;
-
+use aero_sasl::{flow::State, decode::client_command, encode::Encode};
pub struct AuthServer {
login_provider: ArcLoginProvider,
@@ -108,7 +109,8 @@ impl NetLoop {
tracing::trace!(cmd=?cmd, "Received command");
// Make some progress in our local state
- self.state.progress(cmd, &self.login).await;
+ let login = async |user: String, pass: String| self.login.login(user.as_str(), pass.as_str()).await.is_ok();
+ self.state.progress(cmd, login).await;
if matches!(self.state, State::Error) {
bail!("Internal state is in error, previous logs explain what went wrong");
}
diff --git a/aero-sasl/src/flow.rs b/aero-sasl/src/flow.rs
index 6cc698a..31c8bc5 100644
--- a/aero-sasl/src/flow.rs
+++ b/aero-sasl/src/flow.rs
@@ -28,9 +28,9 @@ impl State {
Self::Init
}
- async fn try_auth_plain<'a, X, F>(&self, data: &'a [u8], login: X) -> AuthRes
+ async fn try_auth_plain<X, F>(&self, data: &[u8], login: X) -> AuthRes
where
- X: FnOnce(&'a str, &'a str) -> F,
+ X: FnOnce(String, String) -> F,
F: Future<Output=bool>,
{
// Check that we can extract user's login+pass
@@ -56,7 +56,7 @@ impl State {
};
// Try to connect user
- match login(user, password).await {
+ match login(user.to_string(), password.to_string()).await {
true => AuthRes::Success(user.to_string()),
false => {
tracing::warn!("login failed");
@@ -67,7 +67,7 @@ impl State {
pub async fn progress<F,X>(&mut self, cmd: ClientCommand, login: X)
where
- X: FnOnce(&str, &str) -> F,
+ X: FnOnce(String, String) -> F,
F: Future<Output=bool>,
{
let new_state = 'state: {