make imap envelope addresses parser more relaxed

This commit is contained in:
Clément DOUIN 2024-08-25 08:14:47 +02:00
parent 519955fb96
commit b93642b3bc
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
2 changed files with 83 additions and 69 deletions

146
Cargo.lock generated
View file

@ -32,6 +32,12 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "adler2"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]]
name = "aes"
version = "0.8.4"
@ -256,7 +262,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -291,7 +297,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -343,7 +349,7 @@ dependencies = [
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"miniz_oxide 0.7.4",
"object",
"rustc-demangle",
]
@ -397,7 +403,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
"syn 2.0.74",
"syn 2.0.76",
"which",
]
@ -477,7 +483,7 @@ checksum = "e0af050e27e5d57aa14975f97fe47a134c46a390f91819f23a625319a7111bfa"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -554,9 +560,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.1.13"
version = "1.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48"
checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932"
dependencies = [
"jobserver",
"libc",
@ -670,9 +676,9 @@ dependencies = [
[[package]]
name = "clap_complete"
version = "4.5.18"
version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ee158892bd7ce77aa15c208abbdb73e155d191c287a659b57abd5adb92feb03"
checksum = "531d7959c5bbb6e266cecdd0f20213639c3a5c3e4d615f97db87661745f781ff"
dependencies = [
"clap",
]
@ -686,7 +692,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -959,7 +965,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -1291,7 +1297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f24a09fd651027f8764f8a12c12358715cb9bab622ab3125ede3dd6ae047c95"
dependencies = [
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -1327,7 +1333,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -1348,7 +1354,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -1435,9 +1441,9 @@ dependencies = [
[[package]]
name = "fastrand"
version = "2.1.0"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "ff"
@ -1475,12 +1481,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
[[package]]
name = "flate2"
version = "1.0.31"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920"
checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253"
dependencies = [
"crc32fast",
"miniz_oxide",
"miniz_oxide 0.8.0",
]
[[package]]
@ -1616,7 +1622,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -1786,9 +1792,9 @@ dependencies = [
[[package]]
name = "h2"
version = "0.4.5"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"
dependencies = [
"atomic-waker",
"bytes",
@ -2076,7 +2082,7 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
"h2 0.4.5",
"h2 0.4.6",
"http 1.1.0",
"http-body 1.0.1",
"httparse",
@ -2115,7 +2121,7 @@ dependencies = [
"hyper-util",
"log",
"rustls 0.23.12",
"rustls-native-certs 0.7.1",
"rustls-native-certs 0.7.2",
"rustls-pki-types",
"tokio",
"tokio-rustls 0.26.0",
@ -2203,11 +2209,11 @@ dependencies = [
[[package]]
name = "imap-client"
version = "0.1.4"
source = "git+https://github.com/soywod/imap-client.git#a6eea6f2310ffdc59f27070b0a062604ad9c0f9e"
source = "git+https://github.com/soywod/imap-client#a6eea6f2310ffdc59f27070b0a062604ad9c0f9e"
dependencies = [
"imap-next",
"once_cell",
"rustls-native-certs 0.7.1",
"rustls-native-certs 0.7.2",
"thiserror",
"tokio",
"tokio-rustls 0.26.0",
@ -2217,8 +2223,7 @@ dependencies = [
[[package]]
name = "imap-codec"
version = "2.0.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "204c4816456f1a732d55bb42d90bac69538588dcdf3ef8c9a90b5ca02397021a"
source = "git+https://github.com/soywod/imap-codec#7f5d0918b96a4198811eb73ea12e1a42f43f955b"
dependencies = [
"abnf-core",
"base64 0.22.1",
@ -2231,8 +2236,7 @@ dependencies = [
[[package]]
name = "imap-next"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3abfad92a1a0c7d424df1932c22a528c6ca9323d70c57a84617225a003cf9712"
source = "git+https://github.com/duesee/imap-next?branch=jakoschiko_poison-message-with-fragmentizer#a8c5a7f312da145ead1ef8637abb4c54e76be077"
dependencies = [
"bytes",
"imap-codec",
@ -2246,8 +2250,7 @@ dependencies = [
[[package]]
name = "imap-types"
version = "2.0.0-alpha.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20a1a5a918696bcc51132d4b96f9dd872517e70fcb7a7b8082f0edcd83a84eeb"
source = "git+https://github.com/soywod/imap-codec#7f5d0918b96a4198811eb73ea12e1a42f43f955b"
dependencies = [
"base64 0.22.1",
"bounded-static",
@ -2481,9 +2484,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
version = "0.2.156"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5f43f184355eefb8d17fc948dbecf6c13be3c141f20d834ae842193a448c72a"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libgpg-error-sys"
@ -2697,6 +2700,15 @@ dependencies = [
"adler",
]
[[package]]
name = "miniz_oxide"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
dependencies = [
"adler2",
]
[[package]]
name = "mio"
version = "0.8.11"
@ -2882,7 +2894,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -3245,7 +3257,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -3267,7 +3279,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
dependencies = [
"atomic-waker",
"fastrand 2.1.0",
"fastrand 2.1.1",
"futures-io",
]
@ -3346,12 +3358,12 @@ dependencies = [
[[package]]
name = "prettyplease"
version = "0.2.20"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
checksum = "a909e6e8053fa1a5ad670f5816c7d93029ee1fa8898718490544a6b0d5d38b3e"
dependencies = [
"proc-macro2",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -3426,9 +3438,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
version = "1.0.36"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@ -3503,9 +3515,9 @@ dependencies = [
[[package]]
name = "redox_users"
version = "0.4.5"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom",
"libredox",
@ -3773,9 +3785,9 @@ dependencies = [
[[package]]
name = "rustls-native-certs"
version = "0.7.1"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba"
checksum = "04182dffc9091a404e0fc069ea5cd60e5b866c3adf881eff99a32d048242dffa"
dependencies = [
"openssl-probe",
"rustls-pemfile 2.1.3",
@ -3954,9 +3966,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "serde"
version = "1.0.208"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2"
checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
dependencies = [
"serde_derive",
]
@ -3984,20 +3996,20 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.208"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf"
checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
name = "serde_json"
version = "1.0.125"
version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed"
checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
dependencies = [
"itoa",
"memchr",
@ -4023,7 +4035,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -4269,7 +4281,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -4291,9 +4303,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.74"
version = "2.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
dependencies = [
"proc-macro2",
"quote",
@ -4353,7 +4365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
dependencies = [
"cfg-if",
"fastrand 2.1.0",
"fastrand 2.1.1",
"once_cell",
"rustix 0.38.34",
"windows-sys 0.59.0",
@ -4396,7 +4408,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -4426,9 +4438,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.39.2"
version = "1.39.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1"
checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5"
dependencies = [
"backtrace",
"bytes",
@ -4450,7 +4462,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -4578,7 +4590,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -4830,7 +4842,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
"wasm-bindgen-shared",
]
@ -4864,7 +4876,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -5272,7 +5284,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]
@ -5292,7 +5304,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.76",
]
[[package]]

View file

@ -88,6 +88,8 @@ url = "2.2"
uuid = { version = "0.8", features = ["v4"] }
[patch.crates-io]
email-lib = { git = "https://git.sr.ht/~soywod/pimalaya" }
oauth-lib = { git = "https://git.sr.ht/~soywod/pimalaya" }
imap-client = { git = "https://github.com/soywod/imap-client.git" }
imap-codec = { git = "https://github.com/soywod/imap-codec" }
imap-next = { git = "https://github.com/duesee/imap-next", branch = "jakoschiko_poison-message-with-fragmentizer" }
imap-client = { git = "https://github.com/soywod/imap-client" }
email-lib = { git = "https://git.sr.ht/~soywod/pimalaya" }