From 60ddbe57292b2041896ce31d0920c307f2b866cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:09:22 +0000 Subject: [PATCH 01/50] chore(cargo): bump strum_macros from 0.25.1 to 0.25.2 Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.25.1 to 0.25.2. - [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md) - [Commits](https://github.com/Peternator7/strum/commits) --- updated-dependencies: - dependency-name: strum_macros dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07fd501c4..3596bda62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4567,9 +4567,9 @@ checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum_macros" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6069ca09d878a33f883cc06aaa9718ede171841d3832450354410b718b097232" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ "heck", "proc-macro2", From 6881f9d70f2bb0b7ae31de262614d0b7b924994b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:10:52 +0000 Subject: [PATCH 02/50] chore(cargo): bump syn from 2.0.28 to 2.0.29 Bumps [syn](https://github.com/dtolnay/syn) from 2.0.28 to 2.0.29. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.28...2.0.29) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07fd501c4..fa8bd3445 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -276,7 +276,7 @@ checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -987,7 +987,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -1221,7 +1221,7 @@ name = "deltachat_derive" version = "2.0.0" dependencies = [ "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -1427,7 +1427,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -1727,7 +1727,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2030,7 +2030,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2949,7 +2949,7 @@ checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3063,7 +3063,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3300,7 +3300,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -4268,7 +4268,7 @@ checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -4575,7 +4575,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -4597,9 +4597,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -4729,7 +4729,7 @@ checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -4844,7 +4844,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -5007,7 +5007,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -5340,7 +5340,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -5374,7 +5374,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5777,5 +5777,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] From 88ae653760fc4417fd5f0b728fba0e9f7521d0e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:11:10 +0000 Subject: [PATCH 03/50] chore(cargo): bump chrono from 0.4.26 to 0.4.28 Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.26 to 0.4.28. - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.26...v0.4.28) --- updated-dependencies: - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa8bd3445..088748217 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -643,9 +643,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ "android-tzdata", "iana-time-zone", @@ -653,7 +653,7 @@ dependencies = [ "num-traits", "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.1", ] [[package]] From 99302c9598a3ff467e95957f1ad3f912fb341f8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:07:36 +0000 Subject: [PATCH 04/50] chore(cargo): bump base64 from 0.21.2 to 0.21.3 Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.2 to 0.21.3. - [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md) - [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.21.2...v0.21.3) --- updated-dependencies: - dependency-name: base64 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 088748217..9efe2628b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,7 +215,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b538b767cbf9c162a6c5795d4b932bd2c20ba10b5a91a94d2b2b6886c1dce6a8" dependencies = [ "async-channel", - "base64 0.21.2", + "base64 0.21.3", "bytes", "chrono", "futures", @@ -307,7 +307,7 @@ checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" dependencies = [ "async-trait", "axum-core", - "base64 0.21.2", + "base64 0.21.3", "bitflags 1.3.2", "bytes", "futures-util", @@ -398,9 +398,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "base64ct" @@ -1095,7 +1095,7 @@ dependencies = [ "async-smtp", "async_zip", "backtrace", - "base64 0.21.2", + "base64 0.21.3", "brotli", "chrono", "criterion", @@ -1167,7 +1167,7 @@ dependencies = [ "anyhow", "async-channel", "axum", - "base64 0.21.2", + "base64 0.21.3", "deltachat", "env_logger", "futures", @@ -2490,7 +2490,7 @@ checksum = "e4fb9858c8cd3dd924a5da5bc511363845a9bcfdfac066bb2ef8454eb6111546" dependencies = [ "abao", "anyhow", - "base64 0.21.2", + "base64 0.21.3", "blake3", "bytes", "default-net", @@ -3238,7 +3238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27e1f8e085bfa9b85763fe3ddaacbe90a09cd847b3833129153a6cb063bbe132" dependencies = [ "aes", - "base64 0.21.2", + "base64 0.21.3", "bitfield", "block-padding", "blowfish", @@ -3834,7 +3834,7 @@ version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", "bytes", "encoding_rs", "futures-core", @@ -4055,7 +4055,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", ] [[package]] From cb0270baa7db7e283c1be7f055ce852b875732c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:07:19 +0000 Subject: [PATCH 05/50] chore(cargo): bump anyhow from 1.0.72 to 1.0.75 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.72 to 1.0.75. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.72...1.0.75) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9efe2628b..a51465aa0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -120,9 +120,9 @@ checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" dependencies = [ "backtrace", ] From 2a39a85d9ea0c7fbfddff4e3884bb7100a95b04a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:08:47 +0000 Subject: [PATCH 06/50] chore(cargo): bump thiserror from 1.0.44 to 1.0.47 Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.44 to 1.0.47. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.44...1.0.47) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a51465aa0..c9901bb94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4714,18 +4714,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", From aebad2eb10616a491a5ef90084c1fc24d6430159 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:08:13 +0000 Subject: [PATCH 07/50] chore(cargo): bump url from 2.4.0 to 2.4.1 Bumps [url](https://github.com/servo/rust-url) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/servo/rust-url/releases) - [Commits](https://github.com/servo/rust-url/compare/v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: url dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c9901bb94..e276de14f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5227,9 +5227,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna 0.4.0", From ab09ecce7eaaf03f057188978ac3fe70324bf3cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:09:07 +0000 Subject: [PATCH 08/50] chore(cargo): bump schemars from 0.8.12 to 0.8.13 Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.12 to 0.8.13. - [Release notes](https://github.com/GREsau/schemars/releases) - [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md) - [Commits](https://github.com/GREsau/schemars/compare/v0.8.12...v0.8.13) --- updated-dependencies: - dependency-name: schemars dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- deltachat-jsonrpc/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e276de14f..7143bf150 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4129,9 +4129,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" dependencies = [ "dyn-clone", "schemars_derive", @@ -4141,9 +4141,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" dependencies = [ "proc-macro2", "quote", diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index f5812da18..08aa6fbb4 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -15,7 +15,7 @@ required-features = ["webserver"] anyhow = "1" deltachat = { path = ".." } num-traits = "0.2" -schemars = "0.8.11" +schemars = "0.8.13" serde = { version = "1.0", features = ["derive"] } tempfile = "3.6.0" log = "0.4" From 828c90ac3df85f5a4f4ac90bfdd90c23d05b89fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:06:14 +0000 Subject: [PATCH 09/50] chore(cargo): bump tokio from 1.29.1 to 1.32.0 Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.29.1 to 1.32.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.29.1...tokio-1.32.0) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 11 +++++------ deltachat-jsonrpc/Cargo.toml | 4 ++-- deltachat-rpc-server/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7143bf150..5c5cc9e26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3305,9 +3305,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -4808,11 +4808,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -4821,7 +4820,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index 08aa6fbb4..210550a68 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -24,7 +24,7 @@ futures = { version = "0.3.28" } serde_json = "1.0.99" yerpc = { version = "0.5.2", features = ["anyhow_expose", "openrpc"] } typescript-type-def = { version = "0.5.5", features = ["json_value"] } -tokio = { version = "1.29.1" } +tokio = { version = "1.32.0" } sanitize-filename = "0.5" walkdir = "2.3.3" base64 = "0.21" @@ -34,7 +34,7 @@ axum = { version = "0.6.18", optional = true, features = ["ws"] } env_logger = { version = "0.10.0", optional = true } [dev-dependencies] -tokio = { version = "1.29.1", features = ["full", "rt-multi-thread"] } +tokio = { version = "1.32.0", features = ["full", "rt-multi-thread"] } [features] diff --git a/deltachat-rpc-server/Cargo.toml b/deltachat-rpc-server/Cargo.toml index cf509dd2c..2d3bce6ab 100644 --- a/deltachat-rpc-server/Cargo.toml +++ b/deltachat-rpc-server/Cargo.toml @@ -19,7 +19,7 @@ futures-lite = "1.13.0" log = "0.4" serde_json = "1.0.99" serde = { version = "1.0", features = ["derive"] } -tokio = { version = "1.29.1", features = ["io-std"] } +tokio = { version = "1.32.0", features = ["io-std"] } tokio-util = "0.7.8" yerpc = { version = "0.5.2", features = ["anyhow_expose", "openrpc"] } From 486050d0b83875ffe9faf4abe0e364f76a948e80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Sep 2023 19:16:16 +0000 Subject: [PATCH 10/50] chore(cargo): bump backtrace from 0.3.68 to 0.3.69 Bumps [backtrace](https://github.com/rust-lang/backtrace-rs) from 0.3.68 to 0.3.69. - [Release notes](https://github.com/rust-lang/backtrace-rs/releases) - [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.68...0.3.69) --- updated-dependencies: - dependency-name: backtrace dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5c5cc9e26..2f7332ccc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,9 +17,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -353,9 +353,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -2110,9 +2110,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "group" @@ -3006,9 +3006,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] From d9e38289c42329df1d6b6dbdc7452172c4e8b14a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:09:39 +0000 Subject: [PATCH 11/50] chore(cargo): bump image from 0.24.6 to 0.24.7 Bumps [image](https://github.com/image-rs/image) from 0.24.6 to 0.24.7. - [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md) - [Commits](https://github.com/image-rs/image/compare/v0.24.6...v0.24.7) --- updated-dependencies: - dependency-name: image dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5c5cc9e26..628963d49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2403,9 +2403,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.6" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", diff --git a/Cargo.toml b/Cargo.toml index 6b788c23f..c59c7919b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ futures = "0.3" futures-lite = "1.13.0" hex = "0.4.0" humansize = "2" -image = { version = "0.24.6", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } +image = { version = "0.24.7", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } iroh = { version = "0.4.1", default-features = false } kamadak-exif = "0.5" lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" } From e1f1143919eb6f93d50f232f8c237551eff4a2fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Sep 2023 18:27:47 +0000 Subject: [PATCH 12/50] chore(cargo): bump quote from 1.0.32 to 1.0.33 Bumps [quote](https://github.com/dtolnay/quote) from 1.0.32 to 1.0.33. - [Release notes](https://github.com/dtolnay/quote/releases) - [Commits](https://github.com/dtolnay/quote/compare/1.0.32...1.0.33) --- updated-dependencies: - dependency-name: quote dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 628963d49..1ea91f72a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3614,9 +3614,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] From 8ac1754e18d320666dcaf44d55a7ad36fd413b5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Sep 2023 18:27:37 +0000 Subject: [PATCH 13/50] chore(cargo): bump tempfile from 3.7.0 to 3.8.0 Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.7.0 to 3.8.0. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.7.0...v3.8.0) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- deltachat-jsonrpc/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ea91f72a..5f6c75bd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4667,9 +4667,9 @@ checksum = "094c9f64d6de9a8506b1e49b63a29333b37ed9e821ee04be694d431b3264c3c5" [[package]] name = "tempfile" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand 2.0.0", diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index 210550a68..4e9554e33 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -17,7 +17,7 @@ deltachat = { path = ".." } num-traits = "0.2" schemars = "0.8.13" serde = { version = "1.0", features = ["derive"] } -tempfile = "3.6.0" +tempfile = "3.8.0" log = "0.4" async-channel = { version = "1.8.0" } futures = { version = "0.3.28" } From d8bf1c16918ea633d2668ccaef038039a526f59e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:07:55 +0000 Subject: [PATCH 14/50] chore(cargo): bump reqwest from 0.11.18 to 0.11.20 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.18 to 0.11.20. - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.18...v0.11.20) --- updated-dependencies: - dependency-name: reqwest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 17 ++++------------- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f6c75bd3..5e552d542 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2473,7 +2473,7 @@ dependencies = [ "socket2 0.5.3", "widestring", "windows-sys 0.48.0", - "winreg 0.50.0", + "winreg", ] [[package]] @@ -3830,9 +3830,9 @@ checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "base64 0.21.3", "bytes", @@ -3862,7 +3862,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.10.1", + "winreg", ] [[package]] @@ -5650,15 +5650,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index c59c7919b..00732497e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,7 +72,7 @@ qrcodegen = "1.7.0" quick-xml = "0.30" rand = "0.8" regex = "1.8" -reqwest = { version = "0.11.18", features = ["json"] } +reqwest = { version = "0.11.20", features = ["json"] } rusqlite = { version = "0.29", features = ["sqlcipher"] } rust-hsluv = "0.1" sanitize-filename = "0.5" From ec56134583c69057bd3f07e115d2940680484d05 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 2 Sep 2023 18:40:09 +0000 Subject: [PATCH 15/50] Remove `winreg` entry from deny.toml --- deny.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/deny.toml b/deny.toml index 643aae78e..62798c94d 100644 --- a/deny.toml +++ b/deny.toml @@ -62,7 +62,6 @@ skip = [ { name = "windows_x86_64_gnullvm", version = "<0.48" }, { name = "windows_x86_64_gnu", version = "<0.48" }, { name = "windows_x86_64_msvc", version = "<0.48" }, - { name = "winreg", version = "0.10.1" }, ] From 0a4c993bb8c9284f0cce4e37ddc8d77c22e054f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Sep 2023 19:16:39 +0000 Subject: [PATCH 16/50] chore(cargo): bump serde_json from 1.0.104 to 1.0.105 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.104 to 1.0.105. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.104...v1.0.105) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- deltachat-jsonrpc/Cargo.toml | 2 +- deltachat-rpc-server/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e552d542..86cc0c300 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4284,9 +4284,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index 4e9554e33..1be67da05 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -21,7 +21,7 @@ tempfile = "3.8.0" log = "0.4" async-channel = { version = "1.8.0" } futures = { version = "0.3.28" } -serde_json = "1.0.99" +serde_json = "1.0.105" yerpc = { version = "0.5.2", features = ["anyhow_expose", "openrpc"] } typescript-type-def = { version = "0.5.5", features = ["json_value"] } tokio = { version = "1.32.0" } diff --git a/deltachat-rpc-server/Cargo.toml b/deltachat-rpc-server/Cargo.toml index 2d3bce6ab..ec28043d5 100644 --- a/deltachat-rpc-server/Cargo.toml +++ b/deltachat-rpc-server/Cargo.toml @@ -17,7 +17,7 @@ anyhow = "1" env_logger = { version = "0.10.0" } futures-lite = "1.13.0" log = "0.4" -serde_json = "1.0.99" +serde_json = "1.0.105" serde = { version = "1.0", features = ["derive"] } tokio = { version = "1.32.0", features = ["io-std"] } tokio-util = "0.7.8" From a270db1d8790b3f54cf955106b7e50a13e82864f Mon Sep 17 00:00:00 2001 From: adbenitez Date: Fri, 1 Sep 2023 22:34:14 +0200 Subject: [PATCH 17/50] remove aiodns optional dependency from required dependencies --- deltachat-rpc-client/pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deltachat-rpc-client/pyproject.toml b/deltachat-rpc-client/pyproject.toml index 8bde236a5..629ebb1ef 100644 --- a/deltachat-rpc-client/pyproject.toml +++ b/deltachat-rpc-client/pyproject.toml @@ -6,8 +6,7 @@ build-backend = "setuptools.build_meta" name = "deltachat-rpc-client" description = "Python client for Delta Chat core JSON-RPC interface" dependencies = [ - "aiohttp", - "aiodns" + "aiohttp" ] classifiers = [ "Development Status :: 5 - Production/Stable", From 72c94e1037b5a96fc1b22ebb89ca8d8e0fda1b42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Sep 2023 00:03:50 +0000 Subject: [PATCH 18/50] chore(cargo): bump serde from 1.0.180 to 1.0.188 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.180 to 1.0.188. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.180...v1.0.188) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86cc0c300..3c0621c47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4235,9 +4235,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.180" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -4262,9 +4262,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", From 1b883ae3fa09fe062935f14e751eea5216b0424c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Sep 2023 00:03:55 +0000 Subject: [PATCH 19/50] chore(cargo): bump typescript-type-def from 0.5.7 to 0.5.8 Bumps [typescript-type-def](https://github.com/dbeckwith/rust-typescript-type-def) from 0.5.7 to 0.5.8. - [Changelog](https://github.com/dbeckwith/rust-typescript-type-def/blob/master/CHANGELOG.md) - [Commits](https://github.com/dbeckwith/rust-typescript-type-def/compare/v0.5.7...v0.5.8) --- updated-dependencies: - dependency-name: typescript-type-def dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- deltachat-jsonrpc/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c0621c47..a9164553e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5145,9 +5145,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "typescript-type-def" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c4be05eb0171e18da471e545cfff85d80b8118e5aa2d50c2d152265d7435997" +checksum = "356e00027bd9ef773605a353070dc87684b25561a59087ea3ee3dd5fe8854e83" dependencies = [ "serde_json", "typescript-type-def-derive", @@ -5155,9 +5155,9 @@ dependencies = [ [[package]] name = "typescript-type-def-derive" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71aeb2295da6c2bfe665493332b4e4281d113fab3a0786e9651dcc85708095a4" +checksum = "c4e696c28431595138cc53892104528152cbcf26653ae0aa655e4eaede5b9f69" dependencies = [ "darling 0.13.4", "ident_case", diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index 1be67da05..08eb056c7 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -23,7 +23,7 @@ async-channel = { version = "1.8.0" } futures = { version = "0.3.28" } serde_json = "1.0.105" yerpc = { version = "0.5.2", features = ["anyhow_expose", "openrpc"] } -typescript-type-def = { version = "0.5.5", features = ["json_value"] } +typescript-type-def = { version = "0.5.8", features = ["json_value"] } tokio = { version = "1.32.0" } sanitize-filename = "0.5" walkdir = "2.3.3" From b36acb2dc0ba6aa878e1854afdff3e4d4196d1da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Sep 2023 00:03:10 +0000 Subject: [PATCH 20/50] chore(cargo): bump log from 0.4.19 to 0.4.20 Bumps [log](https://github.com/rust-lang/log) from 0.4.19 to 0.4.20. - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.19...0.4.20) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- deltachat-repl/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9164553e..27d305a63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2666,9 +2666,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru-cache" diff --git a/deltachat-repl/Cargo.toml b/deltachat-repl/Cargo.toml index 32402d1d0..1278938f5 100644 --- a/deltachat-repl/Cargo.toml +++ b/deltachat-repl/Cargo.toml @@ -9,7 +9,7 @@ ansi_term = "0.12.1" anyhow = "1" deltachat = { path = "..", features = ["internals"]} dirs = "5" -log = "0.4.19" +log = "0.4.20" pretty_env_logger = "0.5" rusqlite = "0.29" rustyline = "12" From 9d7bdf369dfdac11f9a16e3f3ca8c1e13c280018 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 2 Sep 2023 19:55:31 +0000 Subject: [PATCH 21/50] refactor: use slices instead of vectors in provider database --- scripts/create-provider-data-rs.py | 4 +- src/configure.rs | 2 +- src/provider.rs | 4 +- src/provider/data.rs | 134 ++++++++++++++--------------- 4 files changed, 72 insertions(+), 72 deletions(-) diff --git a/scripts/create-provider-data-rs.py b/scripts/create-provider-data-rs.py index 824e3354d..100a34fe6 100755 --- a/scripts/create-provider-data-rs.py +++ b/scripts/create-provider-data-rs.py @@ -62,7 +62,7 @@ def process_opt(data): def process_config_defaults(data): if not "config_defaults" in data: return "None" - defaults = "Some(vec![\n" + defaults = "Some(&[\n" config_defaults = data.get("config_defaults", "") for key in config_defaults: value = str(config_defaults[key]) @@ -162,7 +162,7 @@ def process_data(data, file): provider += ' before_login_hint: "' + before_login_hint + '",\n' provider += ' after_login_hint: "' + after_login_hint + '",\n' provider += ' overview_page: "' + file2url(file) + '",\n' - provider += " server: vec![\n" + server + " ],\n" + provider += " server: &[\n" + server + " ],\n" provider += " opt: " + opt + ",\n" provider += " config_defaults: " + config_defaults + ",\n" provider += " oauth2_authorizer: " + oauth2 + ",\n" diff --git a/src/configure.rs b/src/configure.rs index bb63c83d9..378268800 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -130,7 +130,7 @@ async fn on_configure_completed( old_addr: Option, ) -> Result<()> { if let Some(provider) = param.provider { - if let Some(config_defaults) = &provider.config_defaults { + if let Some(config_defaults) = provider.config_defaults { for def in config_defaults { if !context.config_exists(def.key).await? { info!(context, "apply config_defaults {}={}", def.key, def.value); diff --git a/src/provider.rs b/src/provider.rs index 8035acd88..1df329c1d 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -123,10 +123,10 @@ pub struct Provider { pub overview_page: &'static str, /// List of provider servers. - pub server: Vec, + pub server: &'static [Server], /// Default configuration values to set when provider is configured. - pub config_defaults: Option>, + pub config_defaults: Option<&'static [ConfigDefault]>, /// Type of OAuth 2 authorization if provider supports it. pub oauth2_authorizer: Option, diff --git a/src/provider/data.rs b/src/provider/data.rs index 32b1ff465..fedd5630f 100644 --- a/src/provider/data.rs +++ b/src/provider/data.rs @@ -17,7 +17,7 @@ static P_163: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/163", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -45,7 +45,7 @@ static P_AKTIVIX_ORG: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/aktivix-org", - server: vec![ + server: &[ Server { protocol: Imap, socket: Starttls, @@ -74,7 +74,7 @@ static P_AOL: Lazy = Lazy::new(|| { before_login_hint: "To log in to AOL with Delta Chat, you need to set up an app password in the AOL web interface.", after_login_hint: "", overview_page: "https://providers.delta.chat/aol", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "imap.aol.com", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.aol.com", port: 465, username_pattern: Email }, ], @@ -91,7 +91,7 @@ static P_ARCOR_DE: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/arcor-de", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -119,7 +119,7 @@ static P_AUTISTICI_ORG: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/autistici-org", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -147,7 +147,7 @@ static P_BLINDZELN_ORG: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/blindzeln-org", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -175,7 +175,7 @@ static P_BLUEWIN_CH: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/bluewin-ch", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -203,7 +203,7 @@ static P_BUZON_UY: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/buzon-uy", - server: vec![ + server: &[ Server { protocol: Imap, socket: Starttls, @@ -231,7 +231,7 @@ static P_CHELLO_AT: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/chello-at", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -259,7 +259,7 @@ static P_COMCAST: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/comcast", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -272,7 +272,7 @@ static P_DISMAIL_DE: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/dismail-de", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -285,7 +285,7 @@ static P_DISROOT: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/disroot", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -313,7 +313,7 @@ static P_E_EMAIL: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/e-email", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -341,7 +341,7 @@ static P_ESPIV_NET: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/espiv-net", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -355,7 +355,7 @@ static P_EXAMPLE_COM: Lazy = Lazy::new(|| { before_login_hint: "Hush this provider doesn't exist!", after_login_hint: "This provider doesn't really exist, so you can't use it :/ If you need an email provider for Delta Chat, take a look at providers.delta.chat!", overview_page: "https://providers.delta.chat/example-com", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "imap.example.com", port: 1337, username_pattern: Email }, Server { protocol: Smtp, socket: Starttls, hostname: "smtp.example.com", port: 1337, username_pattern: Email }, ], @@ -373,7 +373,7 @@ static P_FASTMAIL: Lazy = Lazy::new(|| Provider { "You must create an app-specific password for Delta Chat before you can log in.", after_login_hint: "", overview_page: "https://providers.delta.chat/fastmail", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -402,7 +402,7 @@ static P_FIREMAIL_DE: Lazy = Lazy::new(|| { before_login_hint: "Firemail erlaubt nur bei bezahlten Accounts den vollen Zugriff auf das E-Mail-Protokoll. Wenn Sie nicht für Firemail bezahlen, verwenden Sie bitte einen anderen E-Mail-Anbieter.", after_login_hint: "Leider schränkt Firemail die maximale Gruppengröße ein. Je nach Bezahlmodell sind nur 5 bis 30 Gruppenmitglieder erlaubt.", overview_page: "https://providers.delta.chat/firemail-de", - server: vec![ + server: &[ ], opt: Default::default(), config_defaults: None, @@ -417,9 +417,9 @@ static P_FIVE_CHAT: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/five-chat", - server: vec![], + server: &[], opt: Default::default(), - config_defaults: Some(vec![ + config_defaults: Some(&[ ConfigDefault { key: Config::BccSelf, value: "1", @@ -444,7 +444,7 @@ static P_FREENET_DE: Lazy = Lazy::new(|| { before_login_hint: "Um deine freenet.de E-Mail-Adresse mit Delta Chat zu benutzen, musst du erst auf der freenet.de-Webseite \"POP3/IMAP/SMTP\" aktivieren.", after_login_hint: "", overview_page: "https://providers.delta.chat/freenet-de", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "mx.freenet.de", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Starttls, hostname: "mx.freenet.de", port: 587, username_pattern: Email }, ], @@ -462,7 +462,7 @@ static P_GMAIL: Lazy = Lazy::new(|| { before_login_hint: "For Gmail accounts, you need to create an app-password if you have \"2-Step Verification\" enabled. If this setting is not available, you need to enable \"less secure apps\".", after_login_hint: "", overview_page: "https://providers.delta.chat/gmail", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "imap.gmail.com", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.gmail.com", port: 465, username_pattern: Email }, ], @@ -482,7 +482,7 @@ static P_GMX_NET: Lazy = Lazy::new(|| Provider { before_login_hint: "You must allow IMAP access to your account before you can login.", after_login_hint: "", overview_page: "https://providers.delta.chat/gmx-net", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -517,12 +517,12 @@ static P_HERMES_RADIO: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/hermes-radio", - server: vec![], + server: &[], opt: ProviderOptions { strict_tls: false, ..Default::default() }, - config_defaults: Some(vec![ + config_defaults: Some(&[ ConfigDefault { key: Config::MdnsEnabled, value: "0", @@ -547,7 +547,7 @@ static P_HEY_COM: Lazy = Lazy::new(|| { before_login_hint: "hey.com does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to hey.com.", after_login_hint: "", overview_page: "https://providers.delta.chat/hey-com", - server: vec![ + server: &[ ], opt: Default::default(), config_defaults: None, @@ -562,7 +562,7 @@ static P_I_UA: Lazy = Lazy::new(|| Provider { before_login_hint: "Протокол IMAP не предоставляется и не планируется.", after_login_hint: "", overview_page: "https://providers.delta.chat/i-ua", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -575,7 +575,7 @@ static P_I3_NET: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/i3-net", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -588,7 +588,7 @@ static P_ICLOUD: Lazy = Lazy::new(|| Provider { before_login_hint: "You must create an app-specific password for Delta Chat before login.", after_login_hint: "", overview_page: "https://providers.delta.chat/icloud", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -616,7 +616,7 @@ static P_INFOMANIAK_COM: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/infomaniak-com", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -647,7 +647,7 @@ static P_KOLST_COM: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/kolst-com", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -660,7 +660,7 @@ static P_KONTENT_COM: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/kontent-com", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -673,7 +673,7 @@ static P_MAIL_DE: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/mail-de", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -702,7 +702,7 @@ static P_MAIL_RU: Lazy = Lazy::new(|| { before_login_hint: "Вам необходимо сгенерировать \"пароль для внешнего приложения\" в веб-интерфейсе mail.ru, чтобы mail.ru работал с Delta Chat.", after_login_hint: "", overview_page: "https://providers.delta.chat/mail-ru", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "imap.mail.ru", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.mail.ru", port: 465, username_pattern: Email }, ], @@ -719,7 +719,7 @@ static P_MAIL2TOR: Lazy = Lazy::new(|| Provider { before_login_hint: "Tor is needed to connect to the email servers.", after_login_hint: "", overview_page: "https://providers.delta.chat/mail2tor", - server: vec![ + server: &[ Server { protocol: Imap, socket: Plain, @@ -747,7 +747,7 @@ static P_MAILBOX_ORG: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/mailbox-org", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -775,7 +775,7 @@ static P_MAILO_COM: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/mailo-com", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -803,7 +803,7 @@ static P_NAUTA_CU: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/nauta-cu", - server: vec![ + server: &[ Server { protocol: Imap, socket: Starttls, @@ -824,7 +824,7 @@ static P_NAUTA_CU: Lazy = Lazy::new(|| Provider { strict_tls: false, ..Default::default() }, - config_defaults: Some(vec![ + config_defaults: Some(&[ ConfigDefault { key: Config::DeleteServerAfter, value: "1", @@ -860,7 +860,7 @@ static P_NAVER: Lazy = Lazy::new(|| Provider { before_login_hint: "Manually enabling IMAP/SMTP is required.", after_login_hint: "", overview_page: "https://providers.delta.chat/naver", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -888,7 +888,7 @@ static P_NUBO_COOP: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/nubo-coop", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -916,7 +916,7 @@ static P_OUTLOOK_COM: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/outlook-com", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -944,7 +944,7 @@ static P_OUVATON_COOP: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/ouvaton-coop", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -972,7 +972,7 @@ static P_POSTEO: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/posteo", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1015,7 +1015,7 @@ static P_PROTONMAIL: Lazy = Lazy::new(|| { before_login_hint: "Protonmail does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to Protonmail.", after_login_hint: "To use Delta Chat with Protonmail, the IMAP bridge must be running in the background. If you have connectivity issues, double check whether it works as expected.", overview_page: "https://providers.delta.chat/protonmail", - server: vec![ + server: &[ ], opt: Default::default(), config_defaults: None, @@ -1031,7 +1031,7 @@ static P_QQ: Lazy = Lazy::new(|| { before_login_hint: "Manually enabling IMAP/SMTP and creating an app-specific password for Delta Chat are required.", after_login_hint: "", overview_page: "https://providers.delta.chat/qq", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "imap.qq.com", port: 993, username_pattern: Emaillocalpart }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.qq.com", port: 465, username_pattern: Email }, ], @@ -1048,7 +1048,7 @@ static P_RISEUP_NET: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/riseup-net", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1076,7 +1076,7 @@ static P_ROGERS_COM: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/rogers-com", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -1089,7 +1089,7 @@ static P_SONIC: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/sonic", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -1102,7 +1102,7 @@ static P_SYSTEMAUSFALL_ORG: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/systemausfall-org", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1130,7 +1130,7 @@ static P_SYSTEMLI_ORG: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/systemli-org", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1159,7 +1159,7 @@ static P_T_ONLINE: Lazy = Lazy::new(|| { before_login_hint: "To use Delta Chat with a T-Online email address, you need to create an app password in the web interface.", after_login_hint: "", overview_page: "https://providers.delta.chat/t-online", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "secureimap.t-online.de", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "securesmtp.t-online.de", port: 465, username_pattern: Email }, ], @@ -1176,7 +1176,7 @@ static P_TESTRUN: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/testrun", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1200,7 +1200,7 @@ static P_TESTRUN: Lazy = Lazy::new(|| Provider { }, ], opt: Default::default(), - config_defaults: Some(vec![ + config_defaults: Some(&[ ConfigDefault { key: Config::BccSelf, value: "1", @@ -1224,7 +1224,7 @@ static P_TISCALI_IT: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/tiscali-it", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1253,7 +1253,7 @@ static P_TUTANOTA: Lazy = Lazy::new(|| { before_login_hint: "Tutanota does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to Tutanota.", after_login_hint: "", overview_page: "https://providers.delta.chat/tutanota", - server: vec![ + server: &[ ], opt: Default::default(), config_defaults: None, @@ -1268,7 +1268,7 @@ static P_UKR_NET: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/ukr-net", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -1281,7 +1281,7 @@ static P_UNDERNET_UY: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/undernet-uy", - server: vec![ + server: &[ Server { protocol: Imap, socket: Starttls, @@ -1309,7 +1309,7 @@ static P_VFEMAIL: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/vfemail", - server: vec![], + server: &[], opt: Default::default(), config_defaults: None, oauth2_authorizer: None, @@ -1322,7 +1322,7 @@ static P_VIVALDI: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/vivaldi", - server: vec![ + server: &[ Server { protocol: Imap, socket: Starttls, @@ -1350,7 +1350,7 @@ static P_VODAFONE_DE: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/vodafone-de", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1379,7 +1379,7 @@ static P_WEB_DE: Lazy = Lazy::new(|| { before_login_hint: "You must allow IMAP access to your account before you can login.", after_login_hint: "Note: if you have your web.de spam settings too strict, you won't receive contact requests from new people. If you want to receive contact requests, you should disable the \"3-Wege-Spamschutz\" in the web.de settings. Read how: https://hilfe.web.de/email/spam-und-viren/spamschutz-einstellungen.html", overview_page: "https://providers.delta.chat/web-de", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "imap.web.de", port: 993, username_pattern: Emaillocalpart }, Server { protocol: Imap, socket: Starttls, hostname: "imap.web.de", port: 143, username_pattern: Emaillocalpart }, Server { protocol: Smtp, socket: Starttls, hostname: "smtp.web.de", port: 587, username_pattern: Emaillocalpart }, @@ -1398,7 +1398,7 @@ static P_YAHOO: Lazy = Lazy::new(|| { before_login_hint: "To use Delta Chat with your Yahoo email address you have to create an \"App-Password\" in the account security screen.", after_login_hint: "", overview_page: "https://providers.delta.chat/yahoo", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, hostname: "imap.mail.yahoo.com", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.mail.yahoo.com", port: 465, username_pattern: Email }, ], @@ -1415,7 +1415,7 @@ static P_YANDEX_RU: Lazy = Lazy::new(|| Provider { before_login_hint: "For Yandex accounts, you have to set IMAP protocol option turned on.", after_login_hint: "", overview_page: "https://providers.delta.chat/yandex-ru", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1444,12 +1444,12 @@ static P_YGGMAIL: Lazy = Lazy::new(|| { before_login_hint: "An Yggmail companion app needs to be installed on your device to access the Yggmail network.", after_login_hint: "Make sure, the Yggmail companion app runs whenever you want to use this account. Note, that you usually cannot write from @yggmail addresses to normal e-mail-addresses (as @gmx.net). However, you can create another account in the normal e-mail-network for this purpose.", overview_page: "https://providers.delta.chat/yggmail", - server: vec![ + server: &[ Server { protocol: Imap, socket: Plain, hostname: "localhost", port: 1143, username_pattern: Email }, Server { protocol: Smtp, socket: Plain, hostname: "localhost", port: 1025, username_pattern: Email }, ], opt: Default::default(), - config_defaults: Some(vec![ + config_defaults: Some(&[ ConfigDefault { key: Config::MvboxMove, value: "0" }, ]), oauth2_authorizer: None, @@ -1463,7 +1463,7 @@ static P_ZIGGO_NL: Lazy = Lazy::new(|| Provider { before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/ziggo-nl", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, @@ -1491,7 +1491,7 @@ static P_ZOHO: Lazy = Lazy::new(|| Provider { before_login_hint: "To use Zoho Mail, you have to turn on IMAP in the Zoho Mail backend.", after_login_hint: "", overview_page: "https://providers.delta.chat/zoho", - server: vec![ + server: &[ Server { protocol: Imap, socket: Ssl, From 49f143e0d576424bc7671068aeda6a83e5e6f60d Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 2 Sep 2023 18:17:04 +0000 Subject: [PATCH 22/50] refactor: make get_abs_path non-generic Generic functions compile into multiple implementations, increasing number of lines for LLVM to process, code size and compilation times. --- src/chat.rs | 6 +++--- src/config.rs | 7 ++++++- src/contact.rs | 4 ++-- src/tools.rs | 25 ++++++++++--------------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index e93fefabe..33fb6d88e 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1311,11 +1311,11 @@ impl Chat { pub async fn get_profile_image(&self, context: &Context) -> Result> { if let Some(image_rel) = self.param.get(Param::ProfileImage) { if !image_rel.is_empty() { - return Ok(Some(get_abs_path(context, image_rel))); + return Ok(Some(get_abs_path(context, Path::new(&image_rel)))); } } else if self.id.is_archived_link() { if let Ok(image_rel) = get_archive_icon(context).await { - return Ok(Some(get_abs_path(context, image_rel))); + return Ok(Some(get_abs_path(context, Path::new(&image_rel)))); } } else if self.typ == Chattype::Single { let contacts = get_chat_contacts(context, self.id).await?; @@ -1326,7 +1326,7 @@ impl Chat { } } else if self.typ == Chattype::Broadcast { if let Ok(image_rel) = get_broadcast_icon(context).await { - return Ok(Some(get_abs_path(context, image_rel))); + return Ok(Some(get_abs_path(context, Path::new(&image_rel)))); } } Ok(None) diff --git a/src/config.rs b/src/config.rs index b90b444c3..e99b6ed24 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,7 @@ //! # Key-value configuration management. use std::env; +use std::path::Path; use std::str::FromStr; use anyhow::{ensure, Context as _, Result}; @@ -329,7 +330,11 @@ impl Context { let value = match key { Config::Selfavatar => { let rel_path = self.sql.get_raw_config(key.as_ref()).await?; - rel_path.map(|p| get_abs_path(self, p).to_string_lossy().into_owned()) + rel_path.map(|p| { + get_abs_path(self, Path::new(&p)) + .to_string_lossy() + .into_owned() + }) } Config::SysVersion => Some((*DC_VERSION_STR).clone()), Config::SysMsgsizeMaxRecommended => Some(format!("{RECOMMENDED_FILE_SIZE}")), diff --git a/src/contact.rs b/src/contact.rs index a5a400214..b2e89e5b3 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -5,7 +5,7 @@ use std::collections::BinaryHeap; use std::convert::{TryFrom, TryInto}; use std::fmt; use std::ops::Deref; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::time::{SystemTime, UNIX_EPOCH}; use anyhow::{bail, ensure, Context as _, Result}; @@ -1186,7 +1186,7 @@ impl Contact { } } else if let Some(image_rel) = self.param.get(Param::ProfileImage) { if !image_rel.is_empty() { - return Ok(Some(get_abs_path(context, image_rel))); + return Ok(Some(get_abs_path(context, Path::new(image_rel)))); } } Ok(None) diff --git a/src/tools.rs b/src/tools.rs index 8c397255f..0ab12ff1b 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -323,17 +323,16 @@ pub fn get_filemeta(buf: &[u8]) -> Result<(u32, u32)> { /// /// If `path` starts with "$BLOBDIR", replaces it with the blobdir path. /// Otherwise, returns path as is. -pub(crate) fn get_abs_path(context: &Context, path: impl AsRef) -> PathBuf { - let p: &Path = path.as_ref(); - if let Ok(p) = p.strip_prefix("$BLOBDIR") { +pub(crate) fn get_abs_path(context: &Context, path: &Path) -> PathBuf { + if let Ok(p) = path.strip_prefix("$BLOBDIR") { context.get_blobdir().join(p) } else { - p.into() + path.into() } } pub(crate) async fn get_filebytes(context: &Context, path: impl AsRef) -> Result { - let path_abs = get_abs_path(context, &path); + let path_abs = get_abs_path(context, path.as_ref()); let meta = fs::metadata(&path_abs).await?; Ok(meta.len()) } @@ -377,7 +376,7 @@ pub(crate) async fn create_folder( context: &Context, path: impl AsRef, ) -> Result<(), io::Error> { - let path_abs = get_abs_path(context, &path); + let path_abs = get_abs_path(context, path.as_ref()); if !path_abs.exists() { match fs::create_dir_all(path_abs).await { Ok(_) => Ok(()), @@ -402,7 +401,7 @@ pub(crate) async fn write_file( path: impl AsRef, buf: &[u8], ) -> Result<(), io::Error> { - let path_abs = get_abs_path(context, &path); + let path_abs = get_abs_path(context, path.as_ref()); fs::write(&path_abs, buf).await.map_err(|err| { warn!( context, @@ -417,7 +416,7 @@ pub(crate) async fn write_file( /// Reads the file and returns its context as a byte vector. pub async fn read_file(context: &Context, path: impl AsRef) -> Result> { - let path_abs = get_abs_path(context, &path); + let path_abs = get_abs_path(context, path.as_ref()); match fs::read(&path_abs).await { Ok(bytes) => Ok(bytes), @@ -434,7 +433,7 @@ pub async fn read_file(context: &Context, path: impl AsRef) -> Result) -> Result { - let path_abs = get_abs_path(context, &path); + let path_abs = get_abs_path(context, path.as_ref()); match fs::File::open(&path_abs).await { Ok(bytes) => Ok(bytes), @@ -450,12 +449,8 @@ pub async fn open_file(context: &Context, path: impl AsRef) -> Result>( - context: &Context, - path: P, -) -> Result { - let p: PathBuf = path.as_ref().into(); - let path_abs = get_abs_path(context, p); +pub fn open_file_std(context: &Context, path: impl AsRef) -> Result { + let path_abs = get_abs_path(context, path.as_ref()); match std::fs::File::open(path_abs) { Ok(bytes) => Ok(bytes), From 54d632adafc37fabf791619ddf5dc6cc0d7b68bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Sep 2023 19:16:13 +0000 Subject: [PATCH 23/50] chore(cargo): bump axum from 0.6.19 to 0.6.20 Bumps [axum](https://github.com/tokio-rs/axum) from 0.6.19 to 0.6.20. - [Release notes](https://github.com/tokio-rs/axum/releases) - [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/axum/compare/axum-v0.6.19...axum-v0.6.20) --- updated-dependencies: - dependency-name: axum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ deltachat-jsonrpc/Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 89e65cfdc..16f669516 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -301,9 +301,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -4899,9 +4899,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" +checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2" dependencies = [ "futures-util", "log", @@ -5111,9 +5111,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" +checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649" dependencies = [ "byteorder", "bytes", diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index 08eb056c7..cb8298ad0 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -30,7 +30,7 @@ walkdir = "2.3.3" base64 = "0.21" # optional dependencies -axum = { version = "0.6.18", optional = true, features = ["ws"] } +axum = { version = "0.6.20", optional = true, features = ["ws"] } env_logger = { version = "0.10.0", optional = true } [dev-dependencies] From 178fc1736d2d65d41442fc7226bf75780c097bd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 21:10:15 +0000 Subject: [PATCH 24/50] chore(cargo): bump trust-dns-resolver from 0.22.0 to 0.23.0 Bumps [trust-dns-resolver](https://github.com/bluejekyll/trust-dns) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/bluejekyll/trust-dns/releases) - [Changelog](https://github.com/bluejekyll/trust-dns/blob/main/CHANGELOG.md) - [Commits](https://github.com/bluejekyll/trust-dns/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: trust-dns-resolver dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 40 ++++++++++++---------------------------- Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 16f669516..907e7def6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1707,14 +1707,14 @@ checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" [[package]] name = "enum-as-inner" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ "heck", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -2380,17 +2380,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[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.4.0" @@ -2705,12 +2694,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.1" @@ -5060,9 +5043,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" +checksum = "0dc775440033cb114085f6f2437682b194fa7546466024b1037e82a48a052a69" dependencies = [ "async-trait", "cfg-if", @@ -5071,9 +5054,9 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.2.3", + "idna", "ipnet", - "lazy_static", + "once_cell", "rand 0.8.5", "smallvec", "thiserror", @@ -5085,16 +5068,17 @@ dependencies = [ [[package]] name = "trust-dns-resolver" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" +checksum = "2dff7aed33ef3e8bf2c9966fccdfed93f93d46f432282ea875cd66faabc6ef2f" dependencies = [ "cfg-if", "futures-util", "ipconfig", - "lazy_static", "lru-cache", + "once_cell", "parking_lot", + "rand 0.8.5", "resolv-conf", "smallvec", "thiserror", @@ -5231,7 +5215,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", ] diff --git a/Cargo.toml b/Cargo.toml index 00732497e..7edc410c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,7 @@ tokio-stream = { version = "0.1.14", features = ["fs"] } tokio-tar = { version = "0.3" } # TODO: integrate tokio into async-tar tokio-util = "0.7.8" toml = "0.7" -trust-dns-resolver = "0.22" +trust-dns-resolver = "0.23" url = "2" uuid = { version = "1", features = ["serde", "v4"] } From e9811fb6da5409eceefc829fba026388aea85bfa Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 2 Sep 2023 22:13:07 +0000 Subject: [PATCH 25/50] AsyncResolver::tokio does not return a Result anymore --- src/provider.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/provider.rs b/src/provider.rs index 1df329c1d..e27f9d631 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -171,7 +171,7 @@ fn get_resolver() -> Result { let resolver = AsyncResolver::tokio( config::ResolverConfig::default(), config::ResolverOpts::default(), - )?; + ); Ok(resolver) } From f94d34c94b5f00aaf3c3571065d3bcf5a4c2021a Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 3 Sep 2023 00:02:44 +0000 Subject: [PATCH 26/50] chore: remove idna from deny.toml --- deny.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/deny.toml b/deny.toml index 62798c94d..8c5fb1dd5 100644 --- a/deny.toml +++ b/deny.toml @@ -32,7 +32,6 @@ skip = [ { name = "fastrand", version = "1.9.0" }, { name = "getrandom", version = "<0.2" }, { name = "hashbrown", version = "<0.14.0" }, - { name = "idna", version = "<0.3" }, { name = "indexmap", version = "<2.0.0" }, { name = "pem-rfc7468", version = "0.6.0" }, { name = "pkcs8", version = "0.9.0" }, From f05b0ddf046155471dc33b9ed1db6e6cd625c11d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:09:31 +0000 Subject: [PATCH 27/50] chore(cargo): bump regex from 1.9.1 to 1.9.5 Bumps [regex](https://github.com/rust-lang/regex) from 1.9.1 to 1.9.5. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.9.1...1.9.5) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 907e7def6..895f67f89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1714,7 +1714,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2717,9 +2717,9 @@ checksum = "df39d232f5c40b0891c10216992c2f250c054105cb1e56f0fc9032db6203ecc1" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memoffset" @@ -3769,14 +3769,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.4", - "regex-syntax 0.7.4", + "regex-automata 0.3.8", + "regex-syntax 0.7.5", ] [[package]] @@ -3790,13 +3790,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.7.5", ] [[package]] @@ -3807,9 +3807,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" diff --git a/Cargo.toml b/Cargo.toml index 7edc410c2..09094a650 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ pretty_env_logger = { version = "0.5", optional = true } qrcodegen = "1.7.0" quick-xml = "0.30" rand = "0.8" -regex = "1.8" +regex = "1.9" reqwest = { version = "0.11.20", features = ["json"] } rusqlite = { version = "0.29", features = ["sqlcipher"] } rust-hsluv = "0.1" From dbe9d7e34e68e75f1ef35e7a7d5cf92dd70603bc Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 4 Sep 2023 18:38:56 +0000 Subject: [PATCH 28/50] refactor(provider): create provider database entries at compile time According to cargo-llvm-lines it reduces the number of lines in the crate by 0.7%. --- scripts/create-provider-data-rs.py | 12 +- src/provider.rs | 4 +- src/provider/data.rs | 1246 ++++++++++++++-------------- 3 files changed, 617 insertions(+), 645 deletions(-) diff --git a/scripts/create-provider-data-rs.py b/scripts/create-provider-data-rs.py index 100a34fe6..589cd0b90 100755 --- a/scripts/create-provider-data-rs.py +++ b/scripts/create-provider-data-rs.py @@ -44,7 +44,7 @@ def file2url(f): def process_opt(data): if not "opt" in data: - return "Default::default()" + return "ProviderOptions::new()" opt = "ProviderOptions {\n" opt_data = data.get("opt", "") for key in opt_data: @@ -54,7 +54,7 @@ def process_opt(data): if value in {"True", "False"}: value = value.lower() opt += " " + key + ": " + value + ",\n" - opt += " ..Default::default()\n" + opt += " ..ProviderOptions::new()\n" opt += " }" return opt @@ -96,11 +96,11 @@ def process_data(data, file): raise TypeError("domain used twice: " + domain) domains_set.add(domain) - domains += ' ("' + domain + '", &*' + file2varname(file) + "),\n" + domains += ' ("' + domain + '", &' + file2varname(file) + "),\n" comment += domain + ", " ids = "" - ids += ' ("' + file2id(file) + '", &*' + file2varname(file) + "),\n" + ids += ' ("' + file2id(file) + '", &' + file2varname(file) + "),\n" server = "" has_imap = False @@ -155,7 +155,7 @@ def process_data(data, file): provider += ( "static " + file2varname(file) - + ": Lazy = Lazy::new(|| Provider {\n" + + ": Provider = Provider {\n" ) provider += ' id: "' + file2id(file) + '",\n' provider += " status: Status::" + status.capitalize() + ",\n" @@ -166,7 +166,7 @@ def process_data(data, file): provider += " opt: " + opt + ",\n" provider += " config_defaults: " + config_defaults + ",\n" provider += " oauth2_authorizer: " + oauth2 + ",\n" - provider += "});\n\n" + provider += "};\n\n" else: raise TypeError("SMTP and IMAP must be specified together or left out both") diff --git a/src/provider.rs b/src/provider.rs index 1df329c1d..9a8a438ca 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -149,8 +149,8 @@ pub struct ProviderOptions { pub delete_to_trash: bool, } -impl Default for ProviderOptions { - fn default() -> Self { +impl ProviderOptions { + const fn new() -> Self { Self { strict_tls: true, max_smtp_rcpt_to: None, diff --git a/src/provider/data.rs b/src/provider/data.rs index fedd5630f..4fa7f2e55 100644 --- a/src/provider/data.rs +++ b/src/provider/data.rs @@ -11,7 +11,7 @@ use std::collections::HashMap; use once_cell::sync::Lazy; // 163.md: 163.com -static P_163: Lazy = Lazy::new(|| Provider { +static P_163: Provider = Provider { id: "163", status: Status::Ok, before_login_hint: "", @@ -33,13 +33,13 @@ static P_163: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // aktivix.org.md: aktivix.org -static P_AKTIVIX_ORG: Lazy = Lazy::new(|| Provider { +static P_AKTIVIX_ORG: Provider = Provider { id: "aktivix.org", status: Status::Ok, before_login_hint: "", @@ -61,14 +61,13 @@ static P_AKTIVIX_ORG: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // aol.md: aol.com -static P_AOL: Lazy = Lazy::new(|| { - Provider { +static P_AOL: Provider = Provider { id: "aol", status: Status::Preparation, before_login_hint: "To log in to AOL with Delta Chat, you need to set up an app password in the AOL web interface.", @@ -78,14 +77,13 @@ static P_AOL: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Ssl, hostname: "imap.aol.com", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.aol.com", port: 465, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // arcor.de.md: arcor.de -static P_ARCOR_DE: Lazy = Lazy::new(|| Provider { +static P_ARCOR_DE: Provider = Provider { id: "arcor.de", status: Status::Ok, before_login_hint: "", @@ -107,13 +105,13 @@ static P_ARCOR_DE: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // autistici.org.md: autistici.org -static P_AUTISTICI_ORG: Lazy = Lazy::new(|| Provider { +static P_AUTISTICI_ORG: Provider = Provider { id: "autistici.org", status: Status::Ok, before_login_hint: "", @@ -135,13 +133,13 @@ static P_AUTISTICI_ORG: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // blindzeln.org.md: delta.blinzeln.de, delta.blindzeln.org -static P_BLINDZELN_ORG: Lazy = Lazy::new(|| Provider { +static P_BLINDZELN_ORG: Provider = Provider { id: "blindzeln.org", status: Status::Ok, before_login_hint: "", @@ -163,13 +161,13 @@ static P_BLINDZELN_ORG: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // bluewin.ch.md: bluewin.ch -static P_BLUEWIN_CH: Lazy = Lazy::new(|| Provider { +static P_BLUEWIN_CH: Provider = Provider { id: "bluewin.ch", status: Status::Ok, before_login_hint: "", @@ -191,13 +189,13 @@ static P_BLUEWIN_CH: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // buzon.uy.md: buzon.uy -static P_BUZON_UY: Lazy = Lazy::new(|| Provider { +static P_BUZON_UY: Provider = Provider { id: "buzon.uy", status: Status::Ok, before_login_hint: "", @@ -219,13 +217,13 @@ static P_BUZON_UY: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // chello.at.md: chello.at -static P_CHELLO_AT: Lazy = Lazy::new(|| Provider { +static P_CHELLO_AT: Provider = Provider { id: "chello.at", status: Status::Ok, before_login_hint: "", @@ -247,39 +245,39 @@ static P_CHELLO_AT: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // comcast.md: xfinity.com, comcast.net -static P_COMCAST: Lazy = Lazy::new(|| Provider { +static P_COMCAST: Provider = Provider { id: "comcast", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/comcast", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // dismail.de.md: dismail.de -static P_DISMAIL_DE: Lazy = Lazy::new(|| Provider { +static P_DISMAIL_DE: Provider = Provider { id: "dismail.de", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/dismail-de", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // disroot.md: disroot.org -static P_DISROOT: Lazy = Lazy::new(|| Provider { +static P_DISROOT: Provider = Provider { id: "disroot", status: Status::Ok, before_login_hint: "", @@ -301,13 +299,13 @@ static P_DISROOT: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // e.email.md: e.email -static P_E_EMAIL: Lazy = Lazy::new(|| Provider { +static P_E_EMAIL: Provider = Provider { id: "e.email", status: Status::Ok, before_login_hint: "", @@ -329,27 +327,26 @@ static P_E_EMAIL: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // espiv.net.md: espiv.net -static P_ESPIV_NET: Lazy = Lazy::new(|| Provider { +static P_ESPIV_NET: Provider = Provider { id: "espiv.net", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/espiv-net", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // example.com.md: example.com, example.org, example.net -static P_EXAMPLE_COM: Lazy = Lazy::new(|| { - Provider { +static P_EXAMPLE_COM: Provider = Provider { id: "example.com", status: Status::Broken, before_login_hint: "Hush this provider doesn't exist!", @@ -359,14 +356,13 @@ static P_EXAMPLE_COM: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Ssl, hostname: "imap.example.com", port: 1337, username_pattern: Email }, Server { protocol: Smtp, socket: Starttls, hostname: "smtp.example.com", port: 1337, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // fastmail.md: 123mail.org, 150mail.com, 150ml.com, 16mail.com, 2-mail.com, 4email.net, 50mail.com, airpost.net, allmail.net, bestmail.us, cluemail.com, elitemail.org, emailcorner.net, emailengine.net, emailengine.org, emailgroups.net, emailplus.org, emailuser.net, eml.cc, f-m.fm, fast-email.com, fast-mail.org, fastem.com, fastemail.us, fastemailer.com, fastest.cc, fastimap.com, fastmail.cn, fastmail.co.uk, fastmail.com, fastmail.com.au, fastmail.de, fastmail.es, fastmail.fm, fastmail.fr, fastmail.im, fastmail.in, fastmail.jp, fastmail.mx, fastmail.net, fastmail.nl, fastmail.org, fastmail.se, fastmail.to, fastmail.tw, fastmail.uk, fastmail.us, fastmailbox.net, fastmessaging.com, fea.st, fmail.co.uk, fmailbox.com, fmgirl.com, fmguy.com, ftml.net, h-mail.us, hailmail.net, imap-mail.com, imap.cc, imapmail.org, inoutbox.com, internet-e-mail.com, internet-mail.org, internetemails.net, internetmailing.net, jetemail.net, justemail.net, letterboxes.org, mail-central.com, mail-page.com, mailandftp.com, mailas.com, mailbolt.com, mailc.net, mailcan.com, mailforce.net, mailftp.com, mailhaven.com, mailingaddress.org, mailite.com, mailmight.com, mailnew.com, mailsent.net, mailservice.ms, mailup.net, mailworks.org, ml1.net, mm.st, myfastmail.com, mymacmail.com, nospammail.net, ownmail.net, petml.com, postinbox.com, postpro.net, proinbox.com, promessage.com, realemail.net, reallyfast.biz, reallyfast.info, rushpost.com, sent.as, sent.at, sent.com, speedpost.net, speedymail.org, ssl-mail.com, swift-mail.com, the-fastest.net, the-quickest.com, theinternetemail.com, veryfast.biz, veryspeedy.net, warpmail.net, xsmail.com, yepmail.net, your-mail.com -static P_FASTMAIL: Lazy = Lazy::new(|| Provider { +static P_FASTMAIL: Provider = Provider { id: "fastmail", status: Status::Preparation, before_login_hint: @@ -389,14 +385,13 @@ static P_FASTMAIL: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // firemail.de.md: firemail.at, firemail.de -static P_FIREMAIL_DE: Lazy = Lazy::new(|| { - Provider { +static P_FIREMAIL_DE: Provider = Provider { id: "firemail.de", status: Status::Preparation, before_login_hint: "Firemail erlaubt nur bei bezahlten Accounts den vollen Zugriff auf das E-Mail-Protokoll. Wenn Sie nicht für Firemail bezahlen, verwenden Sie bitte einen anderen E-Mail-Anbieter.", @@ -404,21 +399,20 @@ static P_FIREMAIL_DE: Lazy = Lazy::new(|| { overview_page: "https://providers.delta.chat/firemail-de", server: &[ ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // five.chat.md: five.chat -static P_FIVE_CHAT: Lazy = Lazy::new(|| Provider { +static P_FIVE_CHAT: Provider = Provider { id: "five.chat", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/five-chat", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: Some(&[ ConfigDefault { key: Config::BccSelf, @@ -434,11 +428,10 @@ static P_FIVE_CHAT: Lazy = Lazy::new(|| Provider { }, ]), oauth2_authorizer: None, -}); +}; // freenet.de.md: freenet.de -static P_FREENET_DE: Lazy = Lazy::new(|| { - Provider { +static P_FREENET_DE: Provider = Provider { id: "freenet.de", status: Status::Preparation, before_login_hint: "Um deine freenet.de E-Mail-Adresse mit Delta Chat zu benutzen, musst du erst auf der freenet.de-Webseite \"POP3/IMAP/SMTP\" aktivieren.", @@ -448,15 +441,13 @@ static P_FREENET_DE: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Ssl, hostname: "mx.freenet.de", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Starttls, hostname: "mx.freenet.de", port: 587, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // gmail.md: gmail.com, googlemail.com, google.com -static P_GMAIL: Lazy = Lazy::new(|| { - Provider { +static P_GMAIL: Provider = Provider { id: "gmail", status: Status::Preparation, before_login_hint: "For Gmail accounts, you need to create an app-password if you have \"2-Step Verification\" enabled. If this setting is not available, you need to enable \"less secure apps\".", @@ -468,15 +459,14 @@ static P_GMAIL: Lazy = Lazy::new(|| { ], opt: ProviderOptions { delete_to_trash: true, - ..Default::default() + ..ProviderOptions::new() }, config_defaults: None, oauth2_authorizer: Some(Oauth2Authorizer::Gmail), -} -}); +}; // gmx.net.md: gmx.net, gmx.de, gmx.at, gmx.ch, gmx.org, gmx.eu, gmx.info, gmx.biz, gmx.com -static P_GMX_NET: Lazy = Lazy::new(|| Provider { +static P_GMX_NET: Provider = Provider { id: "gmx.net", status: Status::Preparation, before_login_hint: "You must allow IMAP access to your account before you can login.", @@ -505,13 +495,13 @@ static P_GMX_NET: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // hermes.radio.md: ac.hermes.radio, ac1.hermes.radio, ac2.hermes.radio, ac3.hermes.radio, ac4.hermes.radio, ac5.hermes.radio, ac6.hermes.radio, ac7.hermes.radio, ac8.hermes.radio, ac9.hermes.radio, ac10.hermes.radio, ac11.hermes.radio, ac12.hermes.radio, ac13.hermes.radio, ac14.hermes.radio, ac15.hermes.radio, ka.hermes.radio, ka1.hermes.radio, ka2.hermes.radio, ka3.hermes.radio, ka4.hermes.radio, ka5.hermes.radio, ka6.hermes.radio, ka7.hermes.radio, ka8.hermes.radio, ka9.hermes.radio, ka10.hermes.radio, ka11.hermes.radio, ka12.hermes.radio, ka13.hermes.radio, ka14.hermes.radio, ka15.hermes.radio, ec.hermes.radio, ec1.hermes.radio, ec2.hermes.radio, ec3.hermes.radio, ec4.hermes.radio, ec5.hermes.radio, ec6.hermes.radio, ec7.hermes.radio, ec8.hermes.radio, ec9.hermes.radio, ec10.hermes.radio, ec11.hermes.radio, ec12.hermes.radio, ec13.hermes.radio, ec14.hermes.radio, ec15.hermes.radio, hermes.radio -static P_HERMES_RADIO: Lazy = Lazy::new(|| Provider { +static P_HERMES_RADIO: Provider = Provider { id: "hermes.radio", status: Status::Ok, before_login_hint: "", @@ -520,7 +510,7 @@ static P_HERMES_RADIO: Lazy = Lazy::new(|| Provider { server: &[], opt: ProviderOptions { strict_tls: false, - ..Default::default() + ..ProviderOptions::new() }, config_defaults: Some(&[ ConfigDefault { @@ -537,11 +527,10 @@ static P_HERMES_RADIO: Lazy = Lazy::new(|| Provider { }, ]), oauth2_authorizer: None, -}); +}; // hey.com.md: hey.com -static P_HEY_COM: Lazy = Lazy::new(|| { - Provider { +static P_HEY_COM: Provider = Provider { id: "hey.com", status: Status::Broken, before_login_hint: "hey.com does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to hey.com.", @@ -549,40 +538,39 @@ static P_HEY_COM: Lazy = Lazy::new(|| { overview_page: "https://providers.delta.chat/hey-com", server: &[ ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // i.ua.md: i.ua -static P_I_UA: Lazy = Lazy::new(|| Provider { +static P_I_UA: Provider = Provider { id: "i.ua", status: Status::Broken, before_login_hint: "Протокол IMAP не предоставляется и не планируется.", after_login_hint: "", overview_page: "https://providers.delta.chat/i-ua", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // i3.net.md: i3.net -static P_I3_NET: Lazy = Lazy::new(|| Provider { +static P_I3_NET: Provider = Provider { id: "i3.net", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/i3-net", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // icloud.md: icloud.com, me.com, mac.com -static P_ICLOUD: Lazy = Lazy::new(|| Provider { +static P_ICLOUD: Provider = Provider { id: "icloud", status: Status::Preparation, before_login_hint: "You must create an app-specific password for Delta Chat before login.", @@ -604,13 +592,13 @@ static P_ICLOUD: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // infomaniak.com.md: ik.me -static P_INFOMANIAK_COM: Lazy = Lazy::new(|| Provider { +static P_INFOMANIAK_COM: Provider = Provider { id: "infomaniak.com", status: Status::Ok, before_login_hint: "", @@ -634,40 +622,40 @@ static P_INFOMANIAK_COM: Lazy = Lazy::new(|| Provider { ], opt: ProviderOptions { max_smtp_rcpt_to: Some(10), - ..Default::default() + ..ProviderOptions::new() }, config_defaults: None, oauth2_authorizer: None, -}); +}; // kolst.com.md: kolst.com -static P_KOLST_COM: Lazy = Lazy::new(|| Provider { +static P_KOLST_COM: Provider = Provider { id: "kolst.com", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/kolst-com", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // kontent.com.md: kontent.com -static P_KONTENT_COM: Lazy = Lazy::new(|| Provider { +static P_KONTENT_COM: Provider = Provider { id: "kontent.com", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/kontent-com", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // mail.de.md: mail.de -static P_MAIL_DE: Lazy = Lazy::new(|| Provider { +static P_MAIL_DE: Provider = Provider { id: "mail.de", status: Status::Ok, before_login_hint: "", @@ -689,14 +677,13 @@ static P_MAIL_DE: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // mail.ru.md: mail.ru, inbox.ru, internet.ru, bk.ru, list.ru -static P_MAIL_RU: Lazy = Lazy::new(|| { - Provider { +static P_MAIL_RU: Provider = Provider { id: "mail.ru", status: Status::Preparation, before_login_hint: "Вам необходимо сгенерировать \"пароль для внешнего приложения\" в веб-интерфейсе mail.ru, чтобы mail.ru работал с Delta Chat.", @@ -706,14 +693,13 @@ static P_MAIL_RU: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Ssl, hostname: "imap.mail.ru", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.mail.ru", port: 465, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // mail2tor.md: mail2tor.com -static P_MAIL2TOR: Lazy = Lazy::new(|| Provider { +static P_MAIL2TOR: Provider = Provider { id: "mail2tor", status: Status::Preparation, before_login_hint: "Tor is needed to connect to the email servers.", @@ -735,13 +721,13 @@ static P_MAIL2TOR: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // mailbox.org.md: mailbox.org, secure.mailbox.org -static P_MAILBOX_ORG: Lazy = Lazy::new(|| Provider { +static P_MAILBOX_ORG: Provider = Provider { id: "mailbox.org", status: Status::Ok, before_login_hint: "", @@ -763,13 +749,13 @@ static P_MAILBOX_ORG: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // mailo.com.md: mailo.com -static P_MAILO_COM: Lazy = Lazy::new(|| Provider { +static P_MAILO_COM: Provider = Provider { id: "mailo.com", status: Status::Ok, before_login_hint: "", @@ -791,13 +777,13 @@ static P_MAILO_COM: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // nauta.cu.md: nauta.cu -static P_NAUTA_CU: Lazy = Lazy::new(|| Provider { +static P_NAUTA_CU: Provider = Provider { id: "nauta.cu", status: Status::Ok, before_login_hint: "", @@ -822,7 +808,7 @@ static P_NAUTA_CU: Lazy = Lazy::new(|| Provider { opt: ProviderOptions { max_smtp_rcpt_to: Some(20), strict_tls: false, - ..Default::default() + ..ProviderOptions::new() }, config_defaults: Some(&[ ConfigDefault { @@ -851,10 +837,10 @@ static P_NAUTA_CU: Lazy = Lazy::new(|| Provider { }, ]), oauth2_authorizer: None, -}); +}; // naver.md: naver.com -static P_NAVER: Lazy = Lazy::new(|| Provider { +static P_NAVER: Provider = Provider { id: "naver", status: Status::Preparation, before_login_hint: "Manually enabling IMAP/SMTP is required.", @@ -876,13 +862,13 @@ static P_NAVER: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // nubo.coop.md: nubo.coop -static P_NUBO_COOP: Lazy = Lazy::new(|| Provider { +static P_NUBO_COOP: Provider = Provider { id: "nubo.coop", status: Status::Ok, before_login_hint: "", @@ -904,13 +890,13 @@ static P_NUBO_COOP: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // outlook.com.md: hotmail.com, outlook.com, office365.com, outlook.com.tr, live.com, outlook.de -static P_OUTLOOK_COM: Lazy = Lazy::new(|| Provider { +static P_OUTLOOK_COM: Provider = Provider { id: "outlook.com", status: Status::Ok, before_login_hint: "", @@ -932,13 +918,13 @@ static P_OUTLOOK_COM: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // ouvaton.coop.md: ouvaton.org -static P_OUVATON_COOP: Lazy = Lazy::new(|| Provider { +static P_OUVATON_COOP: Provider = Provider { id: "ouvaton.coop", status: Status::Ok, before_login_hint: "", @@ -960,13 +946,13 @@ static P_OUVATON_COOP: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // posteo.md: posteo.de, posteo.af, posteo.at, posteo.be, posteo.ca, posteo.ch, posteo.cl, posteo.co, posteo.co.uk, posteo.com.br, posteo.cr, posteo.cz, posteo.dk, posteo.ee, posteo.es, posteo.eu, posteo.fi, posteo.gl, posteo.gr, posteo.hn, posteo.hr, posteo.hu, posteo.ie, posteo.in, posteo.is, posteo.it, posteo.jp, posteo.la, posteo.li, posteo.lt, posteo.lu, posteo.me, posteo.mx, posteo.my, posteo.net, posteo.nl, posteo.no, posteo.nz, posteo.org, posteo.pe, posteo.pl, posteo.pm, posteo.pt, posteo.ro, posteo.ru, posteo.se, posteo.sg, posteo.si, posteo.tn, posteo.uk, posteo.us -static P_POSTEO: Lazy = Lazy::new(|| Provider { +static P_POSTEO: Provider = Provider { id: "posteo", status: Status::Ok, before_login_hint: "", @@ -1002,14 +988,13 @@ static P_POSTEO: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // protonmail.md: protonmail.com, protonmail.ch, pm.me -static P_PROTONMAIL: Lazy = Lazy::new(|| { - Provider { +static P_PROTONMAIL: Provider = Provider { id: "protonmail", status: Status::Broken, before_login_hint: "Protonmail does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to Protonmail.", @@ -1017,15 +1002,13 @@ static P_PROTONMAIL: Lazy = Lazy::new(|| { overview_page: "https://providers.delta.chat/protonmail", server: &[ ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // qq.md: qq.com, foxmail.com -static P_QQ: Lazy = Lazy::new(|| { - Provider { +static P_QQ: Provider = Provider { id: "qq", status: Status::Preparation, before_login_hint: "Manually enabling IMAP/SMTP and creating an app-specific password for Delta Chat are required.", @@ -1035,14 +1018,13 @@ static P_QQ: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Ssl, hostname: "imap.qq.com", port: 993, username_pattern: Emaillocalpart }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.qq.com", port: 465, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // riseup.net.md: riseup.net -static P_RISEUP_NET: Lazy = Lazy::new(|| Provider { +static P_RISEUP_NET: Provider = Provider { id: "riseup.net", status: Status::Ok, before_login_hint: "", @@ -1064,39 +1046,39 @@ static P_RISEUP_NET: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // rogers.com.md: rogers.com -static P_ROGERS_COM: Lazy = Lazy::new(|| Provider { +static P_ROGERS_COM: Provider = Provider { id: "rogers.com", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/rogers-com", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // sonic.md: sonic.net -static P_SONIC: Lazy = Lazy::new(|| Provider { +static P_SONIC: Provider = Provider { id: "sonic", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/sonic", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // systemausfall.org.md: systemausfall.org, solidaris.me -static P_SYSTEMAUSFALL_ORG: Lazy = Lazy::new(|| Provider { +static P_SYSTEMAUSFALL_ORG: Provider = Provider { id: "systemausfall.org", status: Status::Ok, before_login_hint: "", @@ -1118,13 +1100,13 @@ static P_SYSTEMAUSFALL_ORG: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // systemli.org.md: systemli.org -static P_SYSTEMLI_ORG: Lazy = Lazy::new(|| Provider { +static P_SYSTEMLI_ORG: Provider = Provider { id: "systemli.org", status: Status::Ok, before_login_hint: "", @@ -1146,14 +1128,13 @@ static P_SYSTEMLI_ORG: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // t-online.md: t-online.de, magenta.de -static P_T_ONLINE: Lazy = Lazy::new(|| { - Provider { +static P_T_ONLINE: Provider = Provider { id: "t-online", status: Status::Preparation, before_login_hint: "To use Delta Chat with a T-Online email address, you need to create an app password in the web interface.", @@ -1163,14 +1144,13 @@ static P_T_ONLINE: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Ssl, hostname: "secureimap.t-online.de", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "securesmtp.t-online.de", port: 465, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // testrun.md: testrun.org -static P_TESTRUN: Lazy = Lazy::new(|| Provider { +static P_TESTRUN: Provider = Provider { id: "testrun", status: Status::Ok, before_login_hint: "", @@ -1199,7 +1179,7 @@ static P_TESTRUN: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: Some(&[ ConfigDefault { key: Config::BccSelf, @@ -1215,10 +1195,10 @@ static P_TESTRUN: Lazy = Lazy::new(|| Provider { }, ]), oauth2_authorizer: None, -}); +}; // tiscali.it.md: tiscali.it -static P_TISCALI_IT: Lazy = Lazy::new(|| Provider { +static P_TISCALI_IT: Provider = Provider { id: "tiscali.it", status: Status::Ok, before_login_hint: "", @@ -1240,14 +1220,13 @@ static P_TISCALI_IT: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // tutanota.md: tutanota.com, tutanota.de, tutamail.com, tuta.io, keemail.me -static P_TUTANOTA: Lazy = Lazy::new(|| { - Provider { +static P_TUTANOTA: Provider = Provider { id: "tutanota", status: Status::Broken, before_login_hint: "Tutanota does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to Tutanota.", @@ -1255,27 +1234,26 @@ static P_TUTANOTA: Lazy = Lazy::new(|| { overview_page: "https://providers.delta.chat/tutanota", server: &[ ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // ukr.net.md: ukr.net -static P_UKR_NET: Lazy = Lazy::new(|| Provider { +static P_UKR_NET: Provider = Provider { id: "ukr.net", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/ukr-net", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // undernet.uy.md: undernet.uy -static P_UNDERNET_UY: Lazy = Lazy::new(|| Provider { +static P_UNDERNET_UY: Provider = Provider { id: "undernet.uy", status: Status::Ok, before_login_hint: "", @@ -1297,26 +1275,26 @@ static P_UNDERNET_UY: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // vfemail.md: vfemail.net -static P_VFEMAIL: Lazy = Lazy::new(|| Provider { +static P_VFEMAIL: Provider = Provider { id: "vfemail", status: Status::Ok, before_login_hint: "", after_login_hint: "", overview_page: "https://providers.delta.chat/vfemail", server: &[], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // vivaldi.md: vivaldi.net -static P_VIVALDI: Lazy = Lazy::new(|| Provider { +static P_VIVALDI: Provider = Provider { id: "vivaldi", status: Status::Ok, before_login_hint: "", @@ -1338,13 +1316,13 @@ static P_VIVALDI: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // vodafone.de.md: vodafone.de, vodafonemail.de -static P_VODAFONE_DE: Lazy = Lazy::new(|| Provider { +static P_VODAFONE_DE: Provider = Provider { id: "vodafone.de", status: Status::Ok, before_login_hint: "", @@ -1366,14 +1344,13 @@ static P_VODAFONE_DE: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // web.de.md: web.de, email.de, flirt.ms, hallo.ms, kuss.ms, love.ms, magic.ms, singles.ms, cool.ms, kanzler.ms, okay.ms, party.ms, pop.ms, stars.ms, techno.ms, clever.ms, deutschland.ms, genial.ms, ich.ms, online.ms, smart.ms, wichtig.ms, action.ms, fussball.ms, joker.ms, planet.ms, power.ms -static P_WEB_DE: Lazy = Lazy::new(|| { - Provider { +static P_WEB_DE: Provider = Provider { id: "web.de", status: Status::Preparation, before_login_hint: "You must allow IMAP access to your account before you can login.", @@ -1384,15 +1361,13 @@ static P_WEB_DE: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Starttls, hostname: "imap.web.de", port: 143, username_pattern: Emaillocalpart }, Server { protocol: Smtp, socket: Starttls, hostname: "smtp.web.de", port: 587, username_pattern: Emaillocalpart }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // yahoo.md: yahoo.com, yahoo.de, yahoo.it, yahoo.fr, yahoo.es, yahoo.se, yahoo.co.uk, yahoo.co.nz, yahoo.com.au, yahoo.com.ar, yahoo.com.br, yahoo.com.mx, ymail.com, rocketmail.com, yahoodns.net -static P_YAHOO: Lazy = Lazy::new(|| { - Provider { +static P_YAHOO: Provider = Provider { id: "yahoo", status: Status::Preparation, before_login_hint: "To use Delta Chat with your Yahoo email address you have to create an \"App-Password\" in the account security screen.", @@ -1402,14 +1377,13 @@ static P_YAHOO: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Ssl, hostname: "imap.mail.yahoo.com", port: 993, username_pattern: Email }, Server { protocol: Smtp, socket: Ssl, hostname: "smtp.mail.yahoo.com", port: 465, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -} -}); +}; // yandex.ru.md: yandex.com, yandex.by, yandex.kz, yandex.ru, yandex.ua, ya.ru, narod.ru -static P_YANDEX_RU: Lazy = Lazy::new(|| Provider { +static P_YANDEX_RU: Provider = Provider { id: "yandex.ru", status: Status::Preparation, before_login_hint: "For Yandex accounts, you have to set IMAP protocol option turned on.", @@ -1431,14 +1405,13 @@ static P_YANDEX_RU: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: Some(Oauth2Authorizer::Yandex), -}); +}; // yggmail.md: yggmail -static P_YGGMAIL: Lazy = Lazy::new(|| { - Provider { +static P_YGGMAIL: Provider = Provider { id: "yggmail", status: Status::Preparation, before_login_hint: "An Yggmail companion app needs to be installed on your device to access the Yggmail network.", @@ -1448,16 +1421,15 @@ static P_YGGMAIL: Lazy = Lazy::new(|| { Server { protocol: Imap, socket: Plain, hostname: "localhost", port: 1143, username_pattern: Email }, Server { protocol: Smtp, socket: Plain, hostname: "localhost", port: 1025, username_pattern: Email }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: Some(&[ ConfigDefault { key: Config::MvboxMove, value: "0" }, ]), oauth2_authorizer: None, -} -}); +}; // ziggo.nl.md: ziggo.nl -static P_ZIGGO_NL: Lazy = Lazy::new(|| Provider { +static P_ZIGGO_NL: Provider = Provider { id: "ziggo.nl", status: Status::Ok, before_login_hint: "", @@ -1479,13 +1451,13 @@ static P_ZIGGO_NL: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; // zoho.md: zohomail.eu, zohomail.com, zoho.com -static P_ZOHO: Lazy = Lazy::new(|| Provider { +static P_ZOHO: Provider = Provider { id: "zoho", status: Status::Preparation, before_login_hint: "To use Zoho Mail, you have to turn on IMAP in the Zoho Mail backend.", @@ -1507,441 +1479,441 @@ static P_ZOHO: Lazy = Lazy::new(|| Provider { username_pattern: Email, }, ], - opt: Default::default(), + opt: ProviderOptions::new(), config_defaults: None, oauth2_authorizer: None, -}); +}; pub(crate) static PROVIDER_DATA: Lazy> = Lazy::new(|| { HashMap::from([ - ("163.com", &*P_163), - ("aktivix.org", &*P_AKTIVIX_ORG), - ("aol.com", &*P_AOL), - ("arcor.de", &*P_ARCOR_DE), - ("autistici.org", &*P_AUTISTICI_ORG), - ("delta.blinzeln.de", &*P_BLINDZELN_ORG), - ("delta.blindzeln.org", &*P_BLINDZELN_ORG), - ("bluewin.ch", &*P_BLUEWIN_CH), - ("buzon.uy", &*P_BUZON_UY), - ("chello.at", &*P_CHELLO_AT), - ("xfinity.com", &*P_COMCAST), - ("comcast.net", &*P_COMCAST), - ("dismail.de", &*P_DISMAIL_DE), - ("disroot.org", &*P_DISROOT), - ("e.email", &*P_E_EMAIL), - ("espiv.net", &*P_ESPIV_NET), - ("example.com", &*P_EXAMPLE_COM), - ("example.org", &*P_EXAMPLE_COM), - ("example.net", &*P_EXAMPLE_COM), - ("123mail.org", &*P_FASTMAIL), - ("150mail.com", &*P_FASTMAIL), - ("150ml.com", &*P_FASTMAIL), - ("16mail.com", &*P_FASTMAIL), - ("2-mail.com", &*P_FASTMAIL), - ("4email.net", &*P_FASTMAIL), - ("50mail.com", &*P_FASTMAIL), - ("airpost.net", &*P_FASTMAIL), - ("allmail.net", &*P_FASTMAIL), - ("bestmail.us", &*P_FASTMAIL), - ("cluemail.com", &*P_FASTMAIL), - ("elitemail.org", &*P_FASTMAIL), - ("emailcorner.net", &*P_FASTMAIL), - ("emailengine.net", &*P_FASTMAIL), - ("emailengine.org", &*P_FASTMAIL), - ("emailgroups.net", &*P_FASTMAIL), - ("emailplus.org", &*P_FASTMAIL), - ("emailuser.net", &*P_FASTMAIL), - ("eml.cc", &*P_FASTMAIL), - ("f-m.fm", &*P_FASTMAIL), - ("fast-email.com", &*P_FASTMAIL), - ("fast-mail.org", &*P_FASTMAIL), - ("fastem.com", &*P_FASTMAIL), - ("fastemail.us", &*P_FASTMAIL), - ("fastemailer.com", &*P_FASTMAIL), - ("fastest.cc", &*P_FASTMAIL), - ("fastimap.com", &*P_FASTMAIL), - ("fastmail.cn", &*P_FASTMAIL), - ("fastmail.co.uk", &*P_FASTMAIL), - ("fastmail.com", &*P_FASTMAIL), - ("fastmail.com.au", &*P_FASTMAIL), - ("fastmail.de", &*P_FASTMAIL), - ("fastmail.es", &*P_FASTMAIL), - ("fastmail.fm", &*P_FASTMAIL), - ("fastmail.fr", &*P_FASTMAIL), - ("fastmail.im", &*P_FASTMAIL), - ("fastmail.in", &*P_FASTMAIL), - ("fastmail.jp", &*P_FASTMAIL), - ("fastmail.mx", &*P_FASTMAIL), - ("fastmail.net", &*P_FASTMAIL), - ("fastmail.nl", &*P_FASTMAIL), - ("fastmail.org", &*P_FASTMAIL), - ("fastmail.se", &*P_FASTMAIL), - ("fastmail.to", &*P_FASTMAIL), - ("fastmail.tw", &*P_FASTMAIL), - ("fastmail.uk", &*P_FASTMAIL), - ("fastmail.us", &*P_FASTMAIL), - ("fastmailbox.net", &*P_FASTMAIL), - ("fastmessaging.com", &*P_FASTMAIL), - ("fea.st", &*P_FASTMAIL), - ("fmail.co.uk", &*P_FASTMAIL), - ("fmailbox.com", &*P_FASTMAIL), - ("fmgirl.com", &*P_FASTMAIL), - ("fmguy.com", &*P_FASTMAIL), - ("ftml.net", &*P_FASTMAIL), - ("h-mail.us", &*P_FASTMAIL), - ("hailmail.net", &*P_FASTMAIL), - ("imap-mail.com", &*P_FASTMAIL), - ("imap.cc", &*P_FASTMAIL), - ("imapmail.org", &*P_FASTMAIL), - ("inoutbox.com", &*P_FASTMAIL), - ("internet-e-mail.com", &*P_FASTMAIL), - ("internet-mail.org", &*P_FASTMAIL), - ("internetemails.net", &*P_FASTMAIL), - ("internetmailing.net", &*P_FASTMAIL), - ("jetemail.net", &*P_FASTMAIL), - ("justemail.net", &*P_FASTMAIL), - ("letterboxes.org", &*P_FASTMAIL), - ("mail-central.com", &*P_FASTMAIL), - ("mail-page.com", &*P_FASTMAIL), - ("mailandftp.com", &*P_FASTMAIL), - ("mailas.com", &*P_FASTMAIL), - ("mailbolt.com", &*P_FASTMAIL), - ("mailc.net", &*P_FASTMAIL), - ("mailcan.com", &*P_FASTMAIL), - ("mailforce.net", &*P_FASTMAIL), - ("mailftp.com", &*P_FASTMAIL), - ("mailhaven.com", &*P_FASTMAIL), - ("mailingaddress.org", &*P_FASTMAIL), - ("mailite.com", &*P_FASTMAIL), - ("mailmight.com", &*P_FASTMAIL), - ("mailnew.com", &*P_FASTMAIL), - ("mailsent.net", &*P_FASTMAIL), - ("mailservice.ms", &*P_FASTMAIL), - ("mailup.net", &*P_FASTMAIL), - ("mailworks.org", &*P_FASTMAIL), - ("ml1.net", &*P_FASTMAIL), - ("mm.st", &*P_FASTMAIL), - ("myfastmail.com", &*P_FASTMAIL), - ("mymacmail.com", &*P_FASTMAIL), - ("nospammail.net", &*P_FASTMAIL), - ("ownmail.net", &*P_FASTMAIL), - ("petml.com", &*P_FASTMAIL), - ("postinbox.com", &*P_FASTMAIL), - ("postpro.net", &*P_FASTMAIL), - ("proinbox.com", &*P_FASTMAIL), - ("promessage.com", &*P_FASTMAIL), - ("realemail.net", &*P_FASTMAIL), - ("reallyfast.biz", &*P_FASTMAIL), - ("reallyfast.info", &*P_FASTMAIL), - ("rushpost.com", &*P_FASTMAIL), - ("sent.as", &*P_FASTMAIL), - ("sent.at", &*P_FASTMAIL), - ("sent.com", &*P_FASTMAIL), - ("speedpost.net", &*P_FASTMAIL), - ("speedymail.org", &*P_FASTMAIL), - ("ssl-mail.com", &*P_FASTMAIL), - ("swift-mail.com", &*P_FASTMAIL), - ("the-fastest.net", &*P_FASTMAIL), - ("the-quickest.com", &*P_FASTMAIL), - ("theinternetemail.com", &*P_FASTMAIL), - ("veryfast.biz", &*P_FASTMAIL), - ("veryspeedy.net", &*P_FASTMAIL), - ("warpmail.net", &*P_FASTMAIL), - ("xsmail.com", &*P_FASTMAIL), - ("yepmail.net", &*P_FASTMAIL), - ("your-mail.com", &*P_FASTMAIL), - ("firemail.at", &*P_FIREMAIL_DE), - ("firemail.de", &*P_FIREMAIL_DE), - ("five.chat", &*P_FIVE_CHAT), - ("freenet.de", &*P_FREENET_DE), - ("gmail.com", &*P_GMAIL), - ("googlemail.com", &*P_GMAIL), - ("google.com", &*P_GMAIL), - ("gmx.net", &*P_GMX_NET), - ("gmx.de", &*P_GMX_NET), - ("gmx.at", &*P_GMX_NET), - ("gmx.ch", &*P_GMX_NET), - ("gmx.org", &*P_GMX_NET), - ("gmx.eu", &*P_GMX_NET), - ("gmx.info", &*P_GMX_NET), - ("gmx.biz", &*P_GMX_NET), - ("gmx.com", &*P_GMX_NET), - ("ac.hermes.radio", &*P_HERMES_RADIO), - ("ac1.hermes.radio", &*P_HERMES_RADIO), - ("ac2.hermes.radio", &*P_HERMES_RADIO), - ("ac3.hermes.radio", &*P_HERMES_RADIO), - ("ac4.hermes.radio", &*P_HERMES_RADIO), - ("ac5.hermes.radio", &*P_HERMES_RADIO), - ("ac6.hermes.radio", &*P_HERMES_RADIO), - ("ac7.hermes.radio", &*P_HERMES_RADIO), - ("ac8.hermes.radio", &*P_HERMES_RADIO), - ("ac9.hermes.radio", &*P_HERMES_RADIO), - ("ac10.hermes.radio", &*P_HERMES_RADIO), - ("ac11.hermes.radio", &*P_HERMES_RADIO), - ("ac12.hermes.radio", &*P_HERMES_RADIO), - ("ac13.hermes.radio", &*P_HERMES_RADIO), - ("ac14.hermes.radio", &*P_HERMES_RADIO), - ("ac15.hermes.radio", &*P_HERMES_RADIO), - ("ka.hermes.radio", &*P_HERMES_RADIO), - ("ka1.hermes.radio", &*P_HERMES_RADIO), - ("ka2.hermes.radio", &*P_HERMES_RADIO), - ("ka3.hermes.radio", &*P_HERMES_RADIO), - ("ka4.hermes.radio", &*P_HERMES_RADIO), - ("ka5.hermes.radio", &*P_HERMES_RADIO), - ("ka6.hermes.radio", &*P_HERMES_RADIO), - ("ka7.hermes.radio", &*P_HERMES_RADIO), - ("ka8.hermes.radio", &*P_HERMES_RADIO), - ("ka9.hermes.radio", &*P_HERMES_RADIO), - ("ka10.hermes.radio", &*P_HERMES_RADIO), - ("ka11.hermes.radio", &*P_HERMES_RADIO), - ("ka12.hermes.radio", &*P_HERMES_RADIO), - ("ka13.hermes.radio", &*P_HERMES_RADIO), - ("ka14.hermes.radio", &*P_HERMES_RADIO), - ("ka15.hermes.radio", &*P_HERMES_RADIO), - ("ec.hermes.radio", &*P_HERMES_RADIO), - ("ec1.hermes.radio", &*P_HERMES_RADIO), - ("ec2.hermes.radio", &*P_HERMES_RADIO), - ("ec3.hermes.radio", &*P_HERMES_RADIO), - ("ec4.hermes.radio", &*P_HERMES_RADIO), - ("ec5.hermes.radio", &*P_HERMES_RADIO), - ("ec6.hermes.radio", &*P_HERMES_RADIO), - ("ec7.hermes.radio", &*P_HERMES_RADIO), - ("ec8.hermes.radio", &*P_HERMES_RADIO), - ("ec9.hermes.radio", &*P_HERMES_RADIO), - ("ec10.hermes.radio", &*P_HERMES_RADIO), - ("ec11.hermes.radio", &*P_HERMES_RADIO), - ("ec12.hermes.radio", &*P_HERMES_RADIO), - ("ec13.hermes.radio", &*P_HERMES_RADIO), - ("ec14.hermes.radio", &*P_HERMES_RADIO), - ("ec15.hermes.radio", &*P_HERMES_RADIO), - ("hermes.radio", &*P_HERMES_RADIO), - ("hey.com", &*P_HEY_COM), - ("i.ua", &*P_I_UA), - ("i3.net", &*P_I3_NET), - ("icloud.com", &*P_ICLOUD), - ("me.com", &*P_ICLOUD), - ("mac.com", &*P_ICLOUD), - ("ik.me", &*P_INFOMANIAK_COM), - ("kolst.com", &*P_KOLST_COM), - ("kontent.com", &*P_KONTENT_COM), - ("mail.de", &*P_MAIL_DE), - ("mail.ru", &*P_MAIL_RU), - ("inbox.ru", &*P_MAIL_RU), - ("internet.ru", &*P_MAIL_RU), - ("bk.ru", &*P_MAIL_RU), - ("list.ru", &*P_MAIL_RU), - ("mail2tor.com", &*P_MAIL2TOR), - ("mailbox.org", &*P_MAILBOX_ORG), - ("secure.mailbox.org", &*P_MAILBOX_ORG), - ("mailo.com", &*P_MAILO_COM), - ("nauta.cu", &*P_NAUTA_CU), - ("naver.com", &*P_NAVER), - ("nubo.coop", &*P_NUBO_COOP), - ("hotmail.com", &*P_OUTLOOK_COM), - ("outlook.com", &*P_OUTLOOK_COM), - ("office365.com", &*P_OUTLOOK_COM), - ("outlook.com.tr", &*P_OUTLOOK_COM), - ("live.com", &*P_OUTLOOK_COM), - ("outlook.de", &*P_OUTLOOK_COM), - ("ouvaton.org", &*P_OUVATON_COOP), - ("posteo.de", &*P_POSTEO), - ("posteo.af", &*P_POSTEO), - ("posteo.at", &*P_POSTEO), - ("posteo.be", &*P_POSTEO), - ("posteo.ca", &*P_POSTEO), - ("posteo.ch", &*P_POSTEO), - ("posteo.cl", &*P_POSTEO), - ("posteo.co", &*P_POSTEO), - ("posteo.co.uk", &*P_POSTEO), - ("posteo.com.br", &*P_POSTEO), - ("posteo.cr", &*P_POSTEO), - ("posteo.cz", &*P_POSTEO), - ("posteo.dk", &*P_POSTEO), - ("posteo.ee", &*P_POSTEO), - ("posteo.es", &*P_POSTEO), - ("posteo.eu", &*P_POSTEO), - ("posteo.fi", &*P_POSTEO), - ("posteo.gl", &*P_POSTEO), - ("posteo.gr", &*P_POSTEO), - ("posteo.hn", &*P_POSTEO), - ("posteo.hr", &*P_POSTEO), - ("posteo.hu", &*P_POSTEO), - ("posteo.ie", &*P_POSTEO), - ("posteo.in", &*P_POSTEO), - ("posteo.is", &*P_POSTEO), - ("posteo.it", &*P_POSTEO), - ("posteo.jp", &*P_POSTEO), - ("posteo.la", &*P_POSTEO), - ("posteo.li", &*P_POSTEO), - ("posteo.lt", &*P_POSTEO), - ("posteo.lu", &*P_POSTEO), - ("posteo.me", &*P_POSTEO), - ("posteo.mx", &*P_POSTEO), - ("posteo.my", &*P_POSTEO), - ("posteo.net", &*P_POSTEO), - ("posteo.nl", &*P_POSTEO), - ("posteo.no", &*P_POSTEO), - ("posteo.nz", &*P_POSTEO), - ("posteo.org", &*P_POSTEO), - ("posteo.pe", &*P_POSTEO), - ("posteo.pl", &*P_POSTEO), - ("posteo.pm", &*P_POSTEO), - ("posteo.pt", &*P_POSTEO), - ("posteo.ro", &*P_POSTEO), - ("posteo.ru", &*P_POSTEO), - ("posteo.se", &*P_POSTEO), - ("posteo.sg", &*P_POSTEO), - ("posteo.si", &*P_POSTEO), - ("posteo.tn", &*P_POSTEO), - ("posteo.uk", &*P_POSTEO), - ("posteo.us", &*P_POSTEO), - ("protonmail.com", &*P_PROTONMAIL), - ("protonmail.ch", &*P_PROTONMAIL), - ("pm.me", &*P_PROTONMAIL), - ("qq.com", &*P_QQ), - ("foxmail.com", &*P_QQ), - ("riseup.net", &*P_RISEUP_NET), - ("rogers.com", &*P_ROGERS_COM), - ("sonic.net", &*P_SONIC), - ("systemausfall.org", &*P_SYSTEMAUSFALL_ORG), - ("solidaris.me", &*P_SYSTEMAUSFALL_ORG), - ("systemli.org", &*P_SYSTEMLI_ORG), - ("t-online.de", &*P_T_ONLINE), - ("magenta.de", &*P_T_ONLINE), - ("testrun.org", &*P_TESTRUN), - ("tiscali.it", &*P_TISCALI_IT), - ("tutanota.com", &*P_TUTANOTA), - ("tutanota.de", &*P_TUTANOTA), - ("tutamail.com", &*P_TUTANOTA), - ("tuta.io", &*P_TUTANOTA), - ("keemail.me", &*P_TUTANOTA), - ("ukr.net", &*P_UKR_NET), - ("undernet.uy", &*P_UNDERNET_UY), - ("vfemail.net", &*P_VFEMAIL), - ("vivaldi.net", &*P_VIVALDI), - ("vodafone.de", &*P_VODAFONE_DE), - ("vodafonemail.de", &*P_VODAFONE_DE), - ("web.de", &*P_WEB_DE), - ("email.de", &*P_WEB_DE), - ("flirt.ms", &*P_WEB_DE), - ("hallo.ms", &*P_WEB_DE), - ("kuss.ms", &*P_WEB_DE), - ("love.ms", &*P_WEB_DE), - ("magic.ms", &*P_WEB_DE), - ("singles.ms", &*P_WEB_DE), - ("cool.ms", &*P_WEB_DE), - ("kanzler.ms", &*P_WEB_DE), - ("okay.ms", &*P_WEB_DE), - ("party.ms", &*P_WEB_DE), - ("pop.ms", &*P_WEB_DE), - ("stars.ms", &*P_WEB_DE), - ("techno.ms", &*P_WEB_DE), - ("clever.ms", &*P_WEB_DE), - ("deutschland.ms", &*P_WEB_DE), - ("genial.ms", &*P_WEB_DE), - ("ich.ms", &*P_WEB_DE), - ("online.ms", &*P_WEB_DE), - ("smart.ms", &*P_WEB_DE), - ("wichtig.ms", &*P_WEB_DE), - ("action.ms", &*P_WEB_DE), - ("fussball.ms", &*P_WEB_DE), - ("joker.ms", &*P_WEB_DE), - ("planet.ms", &*P_WEB_DE), - ("power.ms", &*P_WEB_DE), - ("yahoo.com", &*P_YAHOO), - ("yahoo.de", &*P_YAHOO), - ("yahoo.it", &*P_YAHOO), - ("yahoo.fr", &*P_YAHOO), - ("yahoo.es", &*P_YAHOO), - ("yahoo.se", &*P_YAHOO), - ("yahoo.co.uk", &*P_YAHOO), - ("yahoo.co.nz", &*P_YAHOO), - ("yahoo.com.au", &*P_YAHOO), - ("yahoo.com.ar", &*P_YAHOO), - ("yahoo.com.br", &*P_YAHOO), - ("yahoo.com.mx", &*P_YAHOO), - ("ymail.com", &*P_YAHOO), - ("rocketmail.com", &*P_YAHOO), - ("yahoodns.net", &*P_YAHOO), - ("yandex.com", &*P_YANDEX_RU), - ("yandex.by", &*P_YANDEX_RU), - ("yandex.kz", &*P_YANDEX_RU), - ("yandex.ru", &*P_YANDEX_RU), - ("yandex.ua", &*P_YANDEX_RU), - ("ya.ru", &*P_YANDEX_RU), - ("narod.ru", &*P_YANDEX_RU), - ("yggmail", &*P_YGGMAIL), - ("ziggo.nl", &*P_ZIGGO_NL), - ("zohomail.eu", &*P_ZOHO), - ("zohomail.com", &*P_ZOHO), - ("zoho.com", &*P_ZOHO), + ("163.com", &P_163), + ("aktivix.org", &P_AKTIVIX_ORG), + ("aol.com", &P_AOL), + ("arcor.de", &P_ARCOR_DE), + ("autistici.org", &P_AUTISTICI_ORG), + ("delta.blinzeln.de", &P_BLINDZELN_ORG), + ("delta.blindzeln.org", &P_BLINDZELN_ORG), + ("bluewin.ch", &P_BLUEWIN_CH), + ("buzon.uy", &P_BUZON_UY), + ("chello.at", &P_CHELLO_AT), + ("xfinity.com", &P_COMCAST), + ("comcast.net", &P_COMCAST), + ("dismail.de", &P_DISMAIL_DE), + ("disroot.org", &P_DISROOT), + ("e.email", &P_E_EMAIL), + ("espiv.net", &P_ESPIV_NET), + ("example.com", &P_EXAMPLE_COM), + ("example.org", &P_EXAMPLE_COM), + ("example.net", &P_EXAMPLE_COM), + ("123mail.org", &P_FASTMAIL), + ("150mail.com", &P_FASTMAIL), + ("150ml.com", &P_FASTMAIL), + ("16mail.com", &P_FASTMAIL), + ("2-mail.com", &P_FASTMAIL), + ("4email.net", &P_FASTMAIL), + ("50mail.com", &P_FASTMAIL), + ("airpost.net", &P_FASTMAIL), + ("allmail.net", &P_FASTMAIL), + ("bestmail.us", &P_FASTMAIL), + ("cluemail.com", &P_FASTMAIL), + ("elitemail.org", &P_FASTMAIL), + ("emailcorner.net", &P_FASTMAIL), + ("emailengine.net", &P_FASTMAIL), + ("emailengine.org", &P_FASTMAIL), + ("emailgroups.net", &P_FASTMAIL), + ("emailplus.org", &P_FASTMAIL), + ("emailuser.net", &P_FASTMAIL), + ("eml.cc", &P_FASTMAIL), + ("f-m.fm", &P_FASTMAIL), + ("fast-email.com", &P_FASTMAIL), + ("fast-mail.org", &P_FASTMAIL), + ("fastem.com", &P_FASTMAIL), + ("fastemail.us", &P_FASTMAIL), + ("fastemailer.com", &P_FASTMAIL), + ("fastest.cc", &P_FASTMAIL), + ("fastimap.com", &P_FASTMAIL), + ("fastmail.cn", &P_FASTMAIL), + ("fastmail.co.uk", &P_FASTMAIL), + ("fastmail.com", &P_FASTMAIL), + ("fastmail.com.au", &P_FASTMAIL), + ("fastmail.de", &P_FASTMAIL), + ("fastmail.es", &P_FASTMAIL), + ("fastmail.fm", &P_FASTMAIL), + ("fastmail.fr", &P_FASTMAIL), + ("fastmail.im", &P_FASTMAIL), + ("fastmail.in", &P_FASTMAIL), + ("fastmail.jp", &P_FASTMAIL), + ("fastmail.mx", &P_FASTMAIL), + ("fastmail.net", &P_FASTMAIL), + ("fastmail.nl", &P_FASTMAIL), + ("fastmail.org", &P_FASTMAIL), + ("fastmail.se", &P_FASTMAIL), + ("fastmail.to", &P_FASTMAIL), + ("fastmail.tw", &P_FASTMAIL), + ("fastmail.uk", &P_FASTMAIL), + ("fastmail.us", &P_FASTMAIL), + ("fastmailbox.net", &P_FASTMAIL), + ("fastmessaging.com", &P_FASTMAIL), + ("fea.st", &P_FASTMAIL), + ("fmail.co.uk", &P_FASTMAIL), + ("fmailbox.com", &P_FASTMAIL), + ("fmgirl.com", &P_FASTMAIL), + ("fmguy.com", &P_FASTMAIL), + ("ftml.net", &P_FASTMAIL), + ("h-mail.us", &P_FASTMAIL), + ("hailmail.net", &P_FASTMAIL), + ("imap-mail.com", &P_FASTMAIL), + ("imap.cc", &P_FASTMAIL), + ("imapmail.org", &P_FASTMAIL), + ("inoutbox.com", &P_FASTMAIL), + ("internet-e-mail.com", &P_FASTMAIL), + ("internet-mail.org", &P_FASTMAIL), + ("internetemails.net", &P_FASTMAIL), + ("internetmailing.net", &P_FASTMAIL), + ("jetemail.net", &P_FASTMAIL), + ("justemail.net", &P_FASTMAIL), + ("letterboxes.org", &P_FASTMAIL), + ("mail-central.com", &P_FASTMAIL), + ("mail-page.com", &P_FASTMAIL), + ("mailandftp.com", &P_FASTMAIL), + ("mailas.com", &P_FASTMAIL), + ("mailbolt.com", &P_FASTMAIL), + ("mailc.net", &P_FASTMAIL), + ("mailcan.com", &P_FASTMAIL), + ("mailforce.net", &P_FASTMAIL), + ("mailftp.com", &P_FASTMAIL), + ("mailhaven.com", &P_FASTMAIL), + ("mailingaddress.org", &P_FASTMAIL), + ("mailite.com", &P_FASTMAIL), + ("mailmight.com", &P_FASTMAIL), + ("mailnew.com", &P_FASTMAIL), + ("mailsent.net", &P_FASTMAIL), + ("mailservice.ms", &P_FASTMAIL), + ("mailup.net", &P_FASTMAIL), + ("mailworks.org", &P_FASTMAIL), + ("ml1.net", &P_FASTMAIL), + ("mm.st", &P_FASTMAIL), + ("myfastmail.com", &P_FASTMAIL), + ("mymacmail.com", &P_FASTMAIL), + ("nospammail.net", &P_FASTMAIL), + ("ownmail.net", &P_FASTMAIL), + ("petml.com", &P_FASTMAIL), + ("postinbox.com", &P_FASTMAIL), + ("postpro.net", &P_FASTMAIL), + ("proinbox.com", &P_FASTMAIL), + ("promessage.com", &P_FASTMAIL), + ("realemail.net", &P_FASTMAIL), + ("reallyfast.biz", &P_FASTMAIL), + ("reallyfast.info", &P_FASTMAIL), + ("rushpost.com", &P_FASTMAIL), + ("sent.as", &P_FASTMAIL), + ("sent.at", &P_FASTMAIL), + ("sent.com", &P_FASTMAIL), + ("speedpost.net", &P_FASTMAIL), + ("speedymail.org", &P_FASTMAIL), + ("ssl-mail.com", &P_FASTMAIL), + ("swift-mail.com", &P_FASTMAIL), + ("the-fastest.net", &P_FASTMAIL), + ("the-quickest.com", &P_FASTMAIL), + ("theinternetemail.com", &P_FASTMAIL), + ("veryfast.biz", &P_FASTMAIL), + ("veryspeedy.net", &P_FASTMAIL), + ("warpmail.net", &P_FASTMAIL), + ("xsmail.com", &P_FASTMAIL), + ("yepmail.net", &P_FASTMAIL), + ("your-mail.com", &P_FASTMAIL), + ("firemail.at", &P_FIREMAIL_DE), + ("firemail.de", &P_FIREMAIL_DE), + ("five.chat", &P_FIVE_CHAT), + ("freenet.de", &P_FREENET_DE), + ("gmail.com", &P_GMAIL), + ("googlemail.com", &P_GMAIL), + ("google.com", &P_GMAIL), + ("gmx.net", &P_GMX_NET), + ("gmx.de", &P_GMX_NET), + ("gmx.at", &P_GMX_NET), + ("gmx.ch", &P_GMX_NET), + ("gmx.org", &P_GMX_NET), + ("gmx.eu", &P_GMX_NET), + ("gmx.info", &P_GMX_NET), + ("gmx.biz", &P_GMX_NET), + ("gmx.com", &P_GMX_NET), + ("ac.hermes.radio", &P_HERMES_RADIO), + ("ac1.hermes.radio", &P_HERMES_RADIO), + ("ac2.hermes.radio", &P_HERMES_RADIO), + ("ac3.hermes.radio", &P_HERMES_RADIO), + ("ac4.hermes.radio", &P_HERMES_RADIO), + ("ac5.hermes.radio", &P_HERMES_RADIO), + ("ac6.hermes.radio", &P_HERMES_RADIO), + ("ac7.hermes.radio", &P_HERMES_RADIO), + ("ac8.hermes.radio", &P_HERMES_RADIO), + ("ac9.hermes.radio", &P_HERMES_RADIO), + ("ac10.hermes.radio", &P_HERMES_RADIO), + ("ac11.hermes.radio", &P_HERMES_RADIO), + ("ac12.hermes.radio", &P_HERMES_RADIO), + ("ac13.hermes.radio", &P_HERMES_RADIO), + ("ac14.hermes.radio", &P_HERMES_RADIO), + ("ac15.hermes.radio", &P_HERMES_RADIO), + ("ka.hermes.radio", &P_HERMES_RADIO), + ("ka1.hermes.radio", &P_HERMES_RADIO), + ("ka2.hermes.radio", &P_HERMES_RADIO), + ("ka3.hermes.radio", &P_HERMES_RADIO), + ("ka4.hermes.radio", &P_HERMES_RADIO), + ("ka5.hermes.radio", &P_HERMES_RADIO), + ("ka6.hermes.radio", &P_HERMES_RADIO), + ("ka7.hermes.radio", &P_HERMES_RADIO), + ("ka8.hermes.radio", &P_HERMES_RADIO), + ("ka9.hermes.radio", &P_HERMES_RADIO), + ("ka10.hermes.radio", &P_HERMES_RADIO), + ("ka11.hermes.radio", &P_HERMES_RADIO), + ("ka12.hermes.radio", &P_HERMES_RADIO), + ("ka13.hermes.radio", &P_HERMES_RADIO), + ("ka14.hermes.radio", &P_HERMES_RADIO), + ("ka15.hermes.radio", &P_HERMES_RADIO), + ("ec.hermes.radio", &P_HERMES_RADIO), + ("ec1.hermes.radio", &P_HERMES_RADIO), + ("ec2.hermes.radio", &P_HERMES_RADIO), + ("ec3.hermes.radio", &P_HERMES_RADIO), + ("ec4.hermes.radio", &P_HERMES_RADIO), + ("ec5.hermes.radio", &P_HERMES_RADIO), + ("ec6.hermes.radio", &P_HERMES_RADIO), + ("ec7.hermes.radio", &P_HERMES_RADIO), + ("ec8.hermes.radio", &P_HERMES_RADIO), + ("ec9.hermes.radio", &P_HERMES_RADIO), + ("ec10.hermes.radio", &P_HERMES_RADIO), + ("ec11.hermes.radio", &P_HERMES_RADIO), + ("ec12.hermes.radio", &P_HERMES_RADIO), + ("ec13.hermes.radio", &P_HERMES_RADIO), + ("ec14.hermes.radio", &P_HERMES_RADIO), + ("ec15.hermes.radio", &P_HERMES_RADIO), + ("hermes.radio", &P_HERMES_RADIO), + ("hey.com", &P_HEY_COM), + ("i.ua", &P_I_UA), + ("i3.net", &P_I3_NET), + ("icloud.com", &P_ICLOUD), + ("me.com", &P_ICLOUD), + ("mac.com", &P_ICLOUD), + ("ik.me", &P_INFOMANIAK_COM), + ("kolst.com", &P_KOLST_COM), + ("kontent.com", &P_KONTENT_COM), + ("mail.de", &P_MAIL_DE), + ("mail.ru", &P_MAIL_RU), + ("inbox.ru", &P_MAIL_RU), + ("internet.ru", &P_MAIL_RU), + ("bk.ru", &P_MAIL_RU), + ("list.ru", &P_MAIL_RU), + ("mail2tor.com", &P_MAIL2TOR), + ("mailbox.org", &P_MAILBOX_ORG), + ("secure.mailbox.org", &P_MAILBOX_ORG), + ("mailo.com", &P_MAILO_COM), + ("nauta.cu", &P_NAUTA_CU), + ("naver.com", &P_NAVER), + ("nubo.coop", &P_NUBO_COOP), + ("hotmail.com", &P_OUTLOOK_COM), + ("outlook.com", &P_OUTLOOK_COM), + ("office365.com", &P_OUTLOOK_COM), + ("outlook.com.tr", &P_OUTLOOK_COM), + ("live.com", &P_OUTLOOK_COM), + ("outlook.de", &P_OUTLOOK_COM), + ("ouvaton.org", &P_OUVATON_COOP), + ("posteo.de", &P_POSTEO), + ("posteo.af", &P_POSTEO), + ("posteo.at", &P_POSTEO), + ("posteo.be", &P_POSTEO), + ("posteo.ca", &P_POSTEO), + ("posteo.ch", &P_POSTEO), + ("posteo.cl", &P_POSTEO), + ("posteo.co", &P_POSTEO), + ("posteo.co.uk", &P_POSTEO), + ("posteo.com.br", &P_POSTEO), + ("posteo.cr", &P_POSTEO), + ("posteo.cz", &P_POSTEO), + ("posteo.dk", &P_POSTEO), + ("posteo.ee", &P_POSTEO), + ("posteo.es", &P_POSTEO), + ("posteo.eu", &P_POSTEO), + ("posteo.fi", &P_POSTEO), + ("posteo.gl", &P_POSTEO), + ("posteo.gr", &P_POSTEO), + ("posteo.hn", &P_POSTEO), + ("posteo.hr", &P_POSTEO), + ("posteo.hu", &P_POSTEO), + ("posteo.ie", &P_POSTEO), + ("posteo.in", &P_POSTEO), + ("posteo.is", &P_POSTEO), + ("posteo.it", &P_POSTEO), + ("posteo.jp", &P_POSTEO), + ("posteo.la", &P_POSTEO), + ("posteo.li", &P_POSTEO), + ("posteo.lt", &P_POSTEO), + ("posteo.lu", &P_POSTEO), + ("posteo.me", &P_POSTEO), + ("posteo.mx", &P_POSTEO), + ("posteo.my", &P_POSTEO), + ("posteo.net", &P_POSTEO), + ("posteo.nl", &P_POSTEO), + ("posteo.no", &P_POSTEO), + ("posteo.nz", &P_POSTEO), + ("posteo.org", &P_POSTEO), + ("posteo.pe", &P_POSTEO), + ("posteo.pl", &P_POSTEO), + ("posteo.pm", &P_POSTEO), + ("posteo.pt", &P_POSTEO), + ("posteo.ro", &P_POSTEO), + ("posteo.ru", &P_POSTEO), + ("posteo.se", &P_POSTEO), + ("posteo.sg", &P_POSTEO), + ("posteo.si", &P_POSTEO), + ("posteo.tn", &P_POSTEO), + ("posteo.uk", &P_POSTEO), + ("posteo.us", &P_POSTEO), + ("protonmail.com", &P_PROTONMAIL), + ("protonmail.ch", &P_PROTONMAIL), + ("pm.me", &P_PROTONMAIL), + ("qq.com", &P_QQ), + ("foxmail.com", &P_QQ), + ("riseup.net", &P_RISEUP_NET), + ("rogers.com", &P_ROGERS_COM), + ("sonic.net", &P_SONIC), + ("systemausfall.org", &P_SYSTEMAUSFALL_ORG), + ("solidaris.me", &P_SYSTEMAUSFALL_ORG), + ("systemli.org", &P_SYSTEMLI_ORG), + ("t-online.de", &P_T_ONLINE), + ("magenta.de", &P_T_ONLINE), + ("testrun.org", &P_TESTRUN), + ("tiscali.it", &P_TISCALI_IT), + ("tutanota.com", &P_TUTANOTA), + ("tutanota.de", &P_TUTANOTA), + ("tutamail.com", &P_TUTANOTA), + ("tuta.io", &P_TUTANOTA), + ("keemail.me", &P_TUTANOTA), + ("ukr.net", &P_UKR_NET), + ("undernet.uy", &P_UNDERNET_UY), + ("vfemail.net", &P_VFEMAIL), + ("vivaldi.net", &P_VIVALDI), + ("vodafone.de", &P_VODAFONE_DE), + ("vodafonemail.de", &P_VODAFONE_DE), + ("web.de", &P_WEB_DE), + ("email.de", &P_WEB_DE), + ("flirt.ms", &P_WEB_DE), + ("hallo.ms", &P_WEB_DE), + ("kuss.ms", &P_WEB_DE), + ("love.ms", &P_WEB_DE), + ("magic.ms", &P_WEB_DE), + ("singles.ms", &P_WEB_DE), + ("cool.ms", &P_WEB_DE), + ("kanzler.ms", &P_WEB_DE), + ("okay.ms", &P_WEB_DE), + ("party.ms", &P_WEB_DE), + ("pop.ms", &P_WEB_DE), + ("stars.ms", &P_WEB_DE), + ("techno.ms", &P_WEB_DE), + ("clever.ms", &P_WEB_DE), + ("deutschland.ms", &P_WEB_DE), + ("genial.ms", &P_WEB_DE), + ("ich.ms", &P_WEB_DE), + ("online.ms", &P_WEB_DE), + ("smart.ms", &P_WEB_DE), + ("wichtig.ms", &P_WEB_DE), + ("action.ms", &P_WEB_DE), + ("fussball.ms", &P_WEB_DE), + ("joker.ms", &P_WEB_DE), + ("planet.ms", &P_WEB_DE), + ("power.ms", &P_WEB_DE), + ("yahoo.com", &P_YAHOO), + ("yahoo.de", &P_YAHOO), + ("yahoo.it", &P_YAHOO), + ("yahoo.fr", &P_YAHOO), + ("yahoo.es", &P_YAHOO), + ("yahoo.se", &P_YAHOO), + ("yahoo.co.uk", &P_YAHOO), + ("yahoo.co.nz", &P_YAHOO), + ("yahoo.com.au", &P_YAHOO), + ("yahoo.com.ar", &P_YAHOO), + ("yahoo.com.br", &P_YAHOO), + ("yahoo.com.mx", &P_YAHOO), + ("ymail.com", &P_YAHOO), + ("rocketmail.com", &P_YAHOO), + ("yahoodns.net", &P_YAHOO), + ("yandex.com", &P_YANDEX_RU), + ("yandex.by", &P_YANDEX_RU), + ("yandex.kz", &P_YANDEX_RU), + ("yandex.ru", &P_YANDEX_RU), + ("yandex.ua", &P_YANDEX_RU), + ("ya.ru", &P_YANDEX_RU), + ("narod.ru", &P_YANDEX_RU), + ("yggmail", &P_YGGMAIL), + ("ziggo.nl", &P_ZIGGO_NL), + ("zohomail.eu", &P_ZOHO), + ("zohomail.com", &P_ZOHO), + ("zoho.com", &P_ZOHO), ]) }); pub(crate) static PROVIDER_IDS: Lazy> = Lazy::new(|| { HashMap::from([ - ("163", &*P_163), - ("aktivix.org", &*P_AKTIVIX_ORG), - ("aol", &*P_AOL), - ("arcor.de", &*P_ARCOR_DE), - ("autistici.org", &*P_AUTISTICI_ORG), - ("blindzeln.org", &*P_BLINDZELN_ORG), - ("bluewin.ch", &*P_BLUEWIN_CH), - ("buzon.uy", &*P_BUZON_UY), - ("chello.at", &*P_CHELLO_AT), - ("comcast", &*P_COMCAST), - ("dismail.de", &*P_DISMAIL_DE), - ("disroot", &*P_DISROOT), - ("e.email", &*P_E_EMAIL), - ("espiv.net", &*P_ESPIV_NET), - ("example.com", &*P_EXAMPLE_COM), - ("fastmail", &*P_FASTMAIL), - ("firemail.de", &*P_FIREMAIL_DE), - ("five.chat", &*P_FIVE_CHAT), - ("freenet.de", &*P_FREENET_DE), - ("gmail", &*P_GMAIL), - ("gmx.net", &*P_GMX_NET), - ("hermes.radio", &*P_HERMES_RADIO), - ("hey.com", &*P_HEY_COM), - ("i.ua", &*P_I_UA), - ("i3.net", &*P_I3_NET), - ("icloud", &*P_ICLOUD), - ("infomaniak.com", &*P_INFOMANIAK_COM), - ("kolst.com", &*P_KOLST_COM), - ("kontent.com", &*P_KONTENT_COM), - ("mail.de", &*P_MAIL_DE), - ("mail.ru", &*P_MAIL_RU), - ("mail2tor", &*P_MAIL2TOR), - ("mailbox.org", &*P_MAILBOX_ORG), - ("mailo.com", &*P_MAILO_COM), - ("nauta.cu", &*P_NAUTA_CU), - ("naver", &*P_NAVER), - ("nubo.coop", &*P_NUBO_COOP), - ("outlook.com", &*P_OUTLOOK_COM), - ("ouvaton.coop", &*P_OUVATON_COOP), - ("posteo", &*P_POSTEO), - ("protonmail", &*P_PROTONMAIL), - ("qq", &*P_QQ), - ("riseup.net", &*P_RISEUP_NET), - ("rogers.com", &*P_ROGERS_COM), - ("sonic", &*P_SONIC), - ("systemausfall.org", &*P_SYSTEMAUSFALL_ORG), - ("systemli.org", &*P_SYSTEMLI_ORG), - ("t-online", &*P_T_ONLINE), - ("testrun", &*P_TESTRUN), - ("tiscali.it", &*P_TISCALI_IT), - ("tutanota", &*P_TUTANOTA), - ("ukr.net", &*P_UKR_NET), - ("undernet.uy", &*P_UNDERNET_UY), - ("vfemail", &*P_VFEMAIL), - ("vivaldi", &*P_VIVALDI), - ("vodafone.de", &*P_VODAFONE_DE), - ("web.de", &*P_WEB_DE), - ("yahoo", &*P_YAHOO), - ("yandex.ru", &*P_YANDEX_RU), - ("yggmail", &*P_YGGMAIL), - ("ziggo.nl", &*P_ZIGGO_NL), - ("zoho", &*P_ZOHO), + ("163", &P_163), + ("aktivix.org", &P_AKTIVIX_ORG), + ("aol", &P_AOL), + ("arcor.de", &P_ARCOR_DE), + ("autistici.org", &P_AUTISTICI_ORG), + ("blindzeln.org", &P_BLINDZELN_ORG), + ("bluewin.ch", &P_BLUEWIN_CH), + ("buzon.uy", &P_BUZON_UY), + ("chello.at", &P_CHELLO_AT), + ("comcast", &P_COMCAST), + ("dismail.de", &P_DISMAIL_DE), + ("disroot", &P_DISROOT), + ("e.email", &P_E_EMAIL), + ("espiv.net", &P_ESPIV_NET), + ("example.com", &P_EXAMPLE_COM), + ("fastmail", &P_FASTMAIL), + ("firemail.de", &P_FIREMAIL_DE), + ("five.chat", &P_FIVE_CHAT), + ("freenet.de", &P_FREENET_DE), + ("gmail", &P_GMAIL), + ("gmx.net", &P_GMX_NET), + ("hermes.radio", &P_HERMES_RADIO), + ("hey.com", &P_HEY_COM), + ("i.ua", &P_I_UA), + ("i3.net", &P_I3_NET), + ("icloud", &P_ICLOUD), + ("infomaniak.com", &P_INFOMANIAK_COM), + ("kolst.com", &P_KOLST_COM), + ("kontent.com", &P_KONTENT_COM), + ("mail.de", &P_MAIL_DE), + ("mail.ru", &P_MAIL_RU), + ("mail2tor", &P_MAIL2TOR), + ("mailbox.org", &P_MAILBOX_ORG), + ("mailo.com", &P_MAILO_COM), + ("nauta.cu", &P_NAUTA_CU), + ("naver", &P_NAVER), + ("nubo.coop", &P_NUBO_COOP), + ("outlook.com", &P_OUTLOOK_COM), + ("ouvaton.coop", &P_OUVATON_COOP), + ("posteo", &P_POSTEO), + ("protonmail", &P_PROTONMAIL), + ("qq", &P_QQ), + ("riseup.net", &P_RISEUP_NET), + ("rogers.com", &P_ROGERS_COM), + ("sonic", &P_SONIC), + ("systemausfall.org", &P_SYSTEMAUSFALL_ORG), + ("systemli.org", &P_SYSTEMLI_ORG), + ("t-online", &P_T_ONLINE), + ("testrun", &P_TESTRUN), + ("tiscali.it", &P_TISCALI_IT), + ("tutanota", &P_TUTANOTA), + ("ukr.net", &P_UKR_NET), + ("undernet.uy", &P_UNDERNET_UY), + ("vfemail", &P_VFEMAIL), + ("vivaldi", &P_VIVALDI), + ("vodafone.de", &P_VODAFONE_DE), + ("web.de", &P_WEB_DE), + ("yahoo", &P_YAHOO), + ("yandex.ru", &P_YANDEX_RU), + ("yggmail", &P_YGGMAIL), + ("ziggo.nl", &P_ZIGGO_NL), + ("zoho", &P_ZOHO), ]) }); From 2587ebbacdf1e5252f0de05473de2ecc020e2ed5 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Tue, 5 Sep 2023 09:15:15 +0200 Subject: [PATCH 29/50] fix: Clear VerifiedOneOnOneChats config on backup (#4681) If the user makes a backup from a UI that supports the experimental verified 1:1 chats (e.g. nightly Android) and imports it into a UI that doesn't, then this config should be cleared. We already talked about this a long time ago after @Simon-Laux noticed this problem, but I think we didn't actually solve it back then? Best to review with whitespace changes disabled. --- src/imex.rs | 107 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 42 deletions(-) diff --git a/src/imex.rs b/src/imex.rs index 94c9c97a5..7f2ce009e 100644 --- a/src/imex.rs +++ b/src/imex.rs @@ -771,6 +771,11 @@ async fn export_database(context: &Context, dest: &Path, passphrase: String) -> let res = conn .query_row("SELECT sqlcipher_export('backup')", [], |_row| Ok(())) .context("failed to export to attached backup database"); + conn.execute( + "UPDATE backup.config SET value='0' WHERE keyname='verified_one_on_one_chats';", + [], + ) + .ok(); // If verified_one_on_one_chats was not set, this errors, which we ignore conn.execute("DETACH DATABASE backup", []) .context("failed to detach backup database")?; res?; @@ -880,55 +885,73 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn test_export_and_import_backup() -> Result<()> { - let backup_dir = tempfile::tempdir().unwrap(); + for set_verified_oneonone_chats in [true, false] { + let backup_dir = tempfile::tempdir().unwrap(); - let context1 = TestContext::new_alice().await; - assert!(context1.is_configured().await?); + let context1 = TestContext::new_alice().await; + assert!(context1.is_configured().await?); + if set_verified_oneonone_chats { + context1 + .set_config_bool(Config::VerifiedOneOnOneChats, true) + .await?; + } - let context2 = TestContext::new().await; - assert!(!context2.is_configured().await?); - assert!(has_backup(&context2, backup_dir.path()).await.is_err()); + let context2 = TestContext::new().await; + assert!(!context2.is_configured().await?); + assert!(has_backup(&context2, backup_dir.path()).await.is_err()); - // export from context1 - assert!( - imex(&context1, ImexMode::ExportBackup, backup_dir.path(), None) - .await - .is_ok() - ); - let _event = context1 - .evtracker - .get_matching(|evt| matches!(evt, EventType::ImexProgress(1000))) - .await; + // export from context1 + assert!( + imex(&context1, ImexMode::ExportBackup, backup_dir.path(), None) + .await + .is_ok() + ); + let _event = context1 + .evtracker + .get_matching(|evt| matches!(evt, EventType::ImexProgress(1000))) + .await; - // import to context2 - let backup = has_backup(&context2, backup_dir.path()).await?; + // import to context2 + let backup = has_backup(&context2, backup_dir.path()).await?; - // Import of unencrypted backup with incorrect "foobar" backup passphrase fails. - assert!(imex( - &context2, - ImexMode::ImportBackup, - backup.as_ref(), - Some("foobar".to_string()) - ) - .await - .is_err()); + // Import of unencrypted backup with incorrect "foobar" backup passphrase fails. + assert!(imex( + &context2, + ImexMode::ImportBackup, + backup.as_ref(), + Some("foobar".to_string()) + ) + .await + .is_err()); - assert!( - imex(&context2, ImexMode::ImportBackup, backup.as_ref(), None) - .await - .is_ok() - ); - let _event = context2 - .evtracker - .get_matching(|evt| matches!(evt, EventType::ImexProgress(1000))) - .await; - - assert!(context2.is_configured().await?); - assert_eq!( - context2.get_config(Config::Addr).await?, - Some("alice@example.org".to_string()) - ); + assert!( + imex(&context2, ImexMode::ImportBackup, backup.as_ref(), None) + .await + .is_ok() + ); + let _event = context2 + .evtracker + .get_matching(|evt| matches!(evt, EventType::ImexProgress(1000))) + .await; + assert!(context2.is_configured().await?); + assert_eq!( + context2.get_config(Config::Addr).await?, + Some("alice@example.org".to_string()) + ); + assert_eq!( + context2 + .get_config_bool(Config::VerifiedOneOnOneChats) + .await?, + false + ); + assert_eq!( + context1 + .get_config_bool(Config::VerifiedOneOnOneChats) + .await?, + set_verified_oneonone_chats + ); + } Ok(()) } From cd477936b5e156e8b972db780b82f404106eb490 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 1 Sep 2023 20:48:47 +0000 Subject: [PATCH 30/50] api: add dc_context_change_passphrase() --- deltachat-ffi/deltachat.h | 13 +++++++++ deltachat-ffi/src/lib.rs | 18 +++++++++++++ src/context.rs | 6 +++++ src/sql.rs | 57 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index fe04ea829..ed90de3d1 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -301,6 +301,19 @@ dc_context_t* dc_context_new_closed (const char* dbfile); int dc_context_open (dc_context_t *context, const char* passphrase); +/** + * Changes the passphrase on the open database. + * Existing database must already be encrypted and the passphrase cannot be NULL or empty. + * It is impossible to encrypt unencrypted database with this method and vice versa. + * + * @memberof dc_context_t + * @param context The context object. + * @param passphrase The new passphrase. + * @return 1 on success, 0 on error. + */ +int dc_context_change_passphrase (dc_context_t* context, const char* passphrase); + + /** * Returns 1 if database is open. * diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index f6c4c7e9f..64ee55c41 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -167,6 +167,24 @@ pub unsafe extern "C" fn dc_context_open( .unwrap_or(0) } +#[no_mangle] +pub unsafe extern "C" fn dc_context_change_passphrase( + context: *mut dc_context_t, + passphrase: *const libc::c_char, +) -> libc::c_int { + if context.is_null() { + eprintln!("ignoring careless call to dc_context_change_passphrase()"); + return 0; + } + + let ctx = &*context; + let passphrase = to_string_lossy(passphrase); + block_on(ctx.change_passphrase(passphrase)) + .context("dc_context_change_passphrase() failed") + .log_err(ctx) + .is_ok() as libc::c_int +} + #[no_mangle] pub unsafe extern "C" fn dc_context_is_open(context: *mut dc_context_t) -> libc::c_int { if context.is_null() { diff --git a/src/context.rs b/src/context.rs index 270676031..ba96035fb 100644 --- a/src/context.rs +++ b/src/context.rs @@ -332,6 +332,12 @@ impl Context { } } + /// Changes encrypted database passphrase. + pub async fn change_passphrase(&self, passphrase: String) -> Result<()> { + self.sql.change_passphrase(passphrase).await?; + Ok(()) + } + /// Returns true if database is open. pub async fn is_open(&self) -> bool { self.sql.is_open().await diff --git a/src/sql.rs b/src/sql.rs index 90549dd4b..ab780a452 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -304,6 +304,20 @@ impl Sql { } } + /// Changes the passphrase of encrypted database. + /// + /// The database must already be encrypted and the passphrase cannot be empty. + /// It is impossible to turn encrypted database into unencrypted + /// and vice versa this way, use import/export for this. + pub async fn change_passphrase(&self, passphrase: String) -> Result<()> { + self.call_write(move |conn| { + conn.pragma_update(None, "rekey", passphrase) + .context("failed to set PRAGMA rekey")?; + Ok(()) + }) + .await + } + /// Locks the write transactions mutex in order to make sure that there never are /// multiple write transactions at once. /// @@ -1246,6 +1260,49 @@ mod tests { sql.open(&t, "foo".to_string()) .await .context("failed to open the database second time")?; + + Ok(()) + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn test_change_passphrase() -> Result<()> { + use tempfile::tempdir; + + // The context is used only for logging. + let t = TestContext::new().await; + + // Create a separate empty database for testing. + let dir = tempdir()?; + let dbfile = dir.path().join("testdb.sqlite"); + let sql = Sql::new(dbfile.clone()); + + sql.open(&t, "foo".to_string()) + .await + .context("failed to open the database first time")?; + sql.close().await; + + // Change the passphrase from "foo" to "bar". + let sql = Sql::new(dbfile.clone()); + sql.open(&t, "foo".to_string()) + .await + .context("failed to open the database second time")?; + sql.change_passphrase("bar".to_string()) + .await + .context("failed to change passphrase")?; + sql.close().await; + + let sql = Sql::new(dbfile); + + // Test that old passphrase is not working. + assert!(sql.open(&t, "foo".to_string()).await.is_err()); + + // Open the database with the new passphrase. + sql.check_passphrase("bar".to_string()).await?; + sql.open(&t, "bar".to_string()) + .await + .context("failed to open the database third time")?; + sql.close().await; + Ok(()) } } From ee2eae63d67ebd28f7b891f66507803da51e30c8 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 5 Sep 2023 12:13:36 +0000 Subject: [PATCH 31/50] fix: do not allow dots at the end of email addresses --- src/contact.rs | 3 ++- src/tools.rs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/contact.rs b/src/contact.rs index b2e89e5b3..ab8522bd0 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -1732,7 +1732,7 @@ mod tests { assert_eq!(may_be_valid_addr("dd.tt"), false); assert_eq!(may_be_valid_addr("tt.dd@uu"), true); assert_eq!(may_be_valid_addr("u@d"), true); - assert_eq!(may_be_valid_addr("u@d."), true); + assert_eq!(may_be_valid_addr("u@d."), false); assert_eq!(may_be_valid_addr("u@d.t"), true); assert_eq!(may_be_valid_addr("u@d.tt"), true); assert_eq!(may_be_valid_addr("u@.tt"), true); @@ -1741,6 +1741,7 @@ mod tests { assert_eq!(may_be_valid_addr("sk <@d.tt>"), false); assert_eq!(may_be_valid_addr("as@sd.de>"), false); assert_eq!(may_be_valid_addr("ask dkl@dd.tt"), false); + assert_eq!(may_be_valid_addr("user@domain.tld."), false); } #[test] diff --git a/src/tools.rs b/src/tools.rs index 0ab12ff1b..0e3ea3076 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -535,6 +535,9 @@ impl EmailAddress { if domain.is_empty() { bail!("missing domain after '@' in {:?}", input); } + if domain.ends_with('.') { + bail!("Domain {domain:?} should not contain the dot in the end"); + } Ok(EmailAddress { local: (*local).to_string(), domain: (*domain).to_string(), @@ -996,7 +999,7 @@ DKIM Results: Passed=true, Works=true, Allow_Keychange=true"; assert_eq!(EmailAddress::new("dd.tt").is_ok(), false); assert!(EmailAddress::new("tt.dd@uu").is_ok()); assert!(EmailAddress::new("u@d").is_ok()); - assert!(EmailAddress::new("u@d.").is_ok()); + assert!(EmailAddress::new("u@d.").is_err()); assert!(EmailAddress::new("u@d.t").is_ok()); assert_eq!( EmailAddress::new("u@d.tt").unwrap(), From 1d9702e9e77cfe559baf59c343e5021d405a18b8 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 7 Jan 2023 13:35:16 +0000 Subject: [PATCH 32/50] refactor: add ChatId::get_timestamp() --- src/chat.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 33fb6d88e..a1e3b9f86 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -871,6 +871,15 @@ impl ChatId { Ok(count) } + /// Returns timestamp of the latest message in the chat. + pub(crate) async fn get_timestamp(self, context: &Context) -> Result> { + let timestamp = context + .sql + .query_get_value("SELECT MAX(timestamp) FROM msgs WHERE chat_id=?", (self,)) + .await?; + Ok(timestamp) + } + pub(crate) async fn get_param(self, context: &Context) -> Result { let res: Option = context .sql @@ -2575,14 +2584,7 @@ pub(crate) async fn marknoticed_chat_if_older_than( chat_id: ChatId, timestamp: i64, ) -> Result<()> { - if let Some(chat_timestamp) = context - .sql - .query_get_value( - "SELECT MAX(timestamp) FROM msgs WHERE chat_id=?", - (chat_id,), - ) - .await? - { + if let Some(chat_timestamp) = chat_id.get_timestamp(context).await? { if timestamp > chat_timestamp { marknoticed_chat(context, chat_id).await?; } From 30024abb6c8eda4bdbdcacf07a29bc053c06637a Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 7 Jan 2023 13:35:31 +0000 Subject: [PATCH 33/50] feat: add API to get similar chats --- deltachat-ffi/deltachat.h | 14 ++++ deltachat-ffi/src/lib.rs | 24 +++++++ deltachat-jsonrpc/src/api/mod.rs | 20 ++++++ deltachat-repl/src/cmdline.rs | 23 ++++-- src/chat.rs | 119 +++++++++++++++++++++++++++++++ src/chatlist.rs | 21 ++++++ 6 files changed, 217 insertions(+), 4 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index ed90de3d1..ff76c3d7c 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -1334,6 +1334,20 @@ int dc_get_msg_cnt (dc_context_t* context, uint32_t ch int dc_get_fresh_msg_cnt (dc_context_t* context, uint32_t chat_id); +/** + * Returns a list of similar chats. + * + * @warning This is an experimental API which may change or be removed in the future. + * + * @memberof dc_context_t + * @param context The context object as returned from dc_context_new(). + * @param chat_id The ID of the chat for which to find similar chats. + * @return The list of similar chats. + * On errors, NULL is returned. + * Must be freed using dc_chatlist_unref() when no longer used. + */ +dc_chatlist_t* dc_get_similar_chatlist (dc_context_t* context, uint32_t chat_id); + /** * Estimate the number of messages that will be deleted diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index 64ee55c41..7548b8a1c 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -1260,6 +1260,30 @@ pub unsafe extern "C" fn dc_get_fresh_msg_cnt( }) } +#[no_mangle] +pub unsafe extern "C" fn dc_get_similar_chatlist( + context: *mut dc_context_t, + chat_id: u32, +) -> *mut dc_chatlist_t { + if context.is_null() { + eprintln!("ignoring careless call to dc_get_similar_chatlist()"); + return ptr::null_mut(); + } + let ctx = &*context; + + let chat_id = ChatId::new(chat_id); + match block_on(chat_id.get_similar_chatlist(ctx)) + .context("failed to get similar chatlist") + .log_err(ctx) + { + Ok(list) => { + let ffi_list = ChatlistWrapper { context, list }; + Box::into_raw(Box::new(ffi_list)) + } + Err(_) => ptr::null_mut(), + } +} + #[no_mangle] pub unsafe extern "C" fn dc_estimate_deletion_cnt( context: *mut dc_context_t, diff --git a/deltachat-jsonrpc/src/api/mod.rs b/deltachat-jsonrpc/src/api/mod.rs index d9b6db8aa..beb5a3c7e 100644 --- a/deltachat-jsonrpc/src/api/mod.rs +++ b/deltachat-jsonrpc/src/api/mod.rs @@ -39,6 +39,7 @@ pub mod types; use num_traits::FromPrimitive; use types::account::Account; use types::chat::FullChat; +use types::chat_list::ChatListEntry; use types::contact::ContactObject; use types::events::Event; use types::http::HttpResponse; @@ -566,6 +567,25 @@ impl CommandApi { Ok(l) } + /// Returns chats similar to the given one. + async fn get_similar_chatlist_entries( + &self, + account_id: u32, + chat_id: u32, + ) -> Result> { + let ctx = self.get_context(account_id).await?; + let chat_id = ChatId::new(chat_id); + let list = chat_id.get_similar_chatlist(&ctx).await?; + let mut l: Vec = Vec::with_capacity(list.len()); + for i in 0..list.len() { + l.push(ChatListEntry( + list.get_chat_id(i)?.to_u32(), + list.get_msg_id(i)?.unwrap_or_default().to_u32(), + )); + } + Ok(l) + } + async fn get_chatlist_items_by_entries( &self, account_id: u32, diff --git a/deltachat-repl/src/cmdline.rs b/deltachat-repl/src/cmdline.rs index c3e473dbe..9e479685b 100644 --- a/deltachat-repl/src/cmdline.rs +++ b/deltachat-repl/src/cmdline.rs @@ -805,15 +805,30 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu } "chatinfo" => { ensure!(sel_chat.is_some(), "No chat selected."); + let sel_chat_id = sel_chat.as_ref().unwrap().get_id(); - let contacts = - chat::get_chat_contacts(&context, sel_chat.as_ref().unwrap().get_id()).await?; + let contacts = chat::get_chat_contacts(&context, sel_chat_id).await?; println!("Memberlist:"); log_contactlist(&context, &contacts).await?; + println!("{} contacts", contacts.len()); + + let similar_chats = sel_chat_id.get_similar_chat_ids(&context).await?; + if !similar_chats.is_empty() { + println!("Similar chats: "); + for (similar_chat_id, metric) in similar_chats { + let similar_chat = Chat::load_from_db(&context, similar_chat_id).await?; + println!( + "{} (#{}) {:.1}", + similar_chat.name, + similar_chat_id, + 100.0 * metric + ); + } + } + println!( - "{} contacts\nLocation streaming: {}", - contacts.len(), + "Location streaming: {}", location::is_sending_locations_to_chat( &context, Some(sel_chat.as_ref().unwrap().get_id()) diff --git a/src/chat.rs b/src/chat.rs index a1e3b9f86..be163f421 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -13,6 +13,7 @@ use serde::{Deserialize, Serialize}; use crate::aheader::EncryptPreference; use crate::blob::BlobObject; +use crate::chatlist::Chatlist; use crate::color::str_to_color; use crate::config::Config; use crate::constants::{ @@ -880,6 +881,124 @@ impl ChatId { Ok(timestamp) } + /// Returns a list of active similar chat IDs sorted by similarity metric. + /// + /// Jaccard similarity coefficient is used to estimate similarity of chat member sets. + /// + /// Chat is considered active if something was posted there within the last 42 days. + pub async fn get_similar_chat_ids(self, context: &Context) -> Result> { + // Count number of common members in this and other chats. + let intersection: Vec<(ChatId, f64)> = context + .sql + .query_map( + "SELECT y.chat_id, SUM(x.contact_id = y.contact_id) + FROM chats_contacts as x + JOIN chats_contacts as y + WHERE x.contact_id > 9 + AND y.contact_id > 9 + AND x.chat_id=? + AND y.chat_id<>x.chat_id + GROUP BY y.chat_id", + (self,), + |row| { + let chat_id: ChatId = row.get(0)?; + let intersection: f64 = row.get(1)?; + Ok((chat_id, intersection)) + }, + |rows| { + rows.collect::, _>>() + .map_err(Into::into) + }, + ) + .await + .context("failed to calculate member set intersections")?; + + let chat_size: HashMap = context + .sql + .query_map( + "SELECT chat_id, count(*) AS n + FROM chats_contacts where contact_id > 9 + GROUP BY chat_id", + (), + |row| { + let chat_id: ChatId = row.get(0)?; + let size: f64 = row.get(1)?; + Ok((chat_id, size)) + }, + |rows| { + rows.collect::, _>>() + .map_err(Into::into) + }, + ) + .await + .context("failed to count chat member sizes")?; + + let our_chat_size = chat_size.get(&self).copied().unwrap_or_default(); + let mut chats_with_metrics = Vec::new(); + for (chat_id, intersection_size) in intersection { + if intersection_size > 0.0 { + let other_chat_size = chat_size.get(&chat_id).copied().unwrap_or_default(); + let union_size = our_chat_size + other_chat_size - intersection_size; + let metric = intersection_size / union_size; + chats_with_metrics.push((chat_id, metric)) + } + } + chats_with_metrics.sort_unstable_by(|(chat_id1, metric1), (chat_id2, metric2)| { + metric2 + .partial_cmp(metric1) + .unwrap_or(chat_id2.cmp(chat_id1)) + }); + + // Select up to five similar active chats. + let mut res = Vec::new(); + let now = time(); + for (chat_id, metric) in chats_with_metrics { + if let Some(chat_timestamp) = chat_id.get_timestamp(context).await? { + if now > chat_timestamp + 42 * 24 * 3600 { + // Chat was inactive for 42 days, skip. + continue; + } + } + + if metric < 0.1 { + // Chat is unrelated. + break; + } + + let chat = Chat::load_from_db(context, chat_id).await?; + if chat.typ != Chattype::Group { + continue; + } + + match chat.visibility { + ChatVisibility::Normal | ChatVisibility::Pinned => {} + ChatVisibility::Archived => continue, + } + + res.push((chat_id, metric)); + if res.len() >= 5 { + break; + } + } + + Ok(res) + } + + /// Returns similar chats as a [`Chatlist`]. + /// + /// [`Chatlist`]: crate::chatlist::Chatlist + pub async fn get_similar_chatlist(self, context: &Context) -> Result { + let chat_ids: Vec = self + .get_similar_chat_ids(context) + .await + .context("failed to get similar chat IDs")? + .into_iter() + .map(|(chat_id, _metric)| chat_id) + .collect(); + let chatlist = Chatlist::from_chat_ids(context, &chat_ids).await?; + Ok(chatlist) + } + pub(crate) async fn get_param(self, context: &Context) -> Result { let res: Option = context .sql diff --git a/src/chatlist.rs b/src/chatlist.rs index c7a2e4b8a..2cb14c012 100644 --- a/src/chatlist.rs +++ b/src/chatlist.rs @@ -296,6 +296,27 @@ impl Chatlist { Ok(Chatlist { ids }) } + /// Converts list of chat IDs to a chatlist. + pub(crate) async fn from_chat_ids(context: &Context, chat_ids: &[ChatId]) -> Result { + let mut ids = Vec::new(); + for &chat_id in chat_ids { + let msg_id: Option = context + .sql + .query_get_value( + "SELECT id + FROM msgs + WHERE chat_id=?1 + AND (hidden=0 OR state=?2) + ORDER BY timestamp DESC, id DESC LIMIT 1", + (chat_id, MessageState::OutDraft), + ) + .await + .with_context(|| format!("failed to get msg ID for chat {}", chat_id))?; + ids.push((chat_id, msg_id)); + } + Ok(Chatlist { ids }) + } + /// Find out the number of chats. pub fn len(&self) -> usize { self.ids.len() From b36b902eeb14bbd14ce4fc127d18baf4b4383c7b Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 6 Sep 2023 16:43:28 +0000 Subject: [PATCH 34/50] build: build node packages on Ubuntu 18.04 Debian 10 has glibc 2.28, so packages built with it do not work on Ubuntu 18.04. --- .github/workflows/node-package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-package.yml b/.github/workflows/node-package.yml index 41c4ff25d..5e5b79108 100644 --- a/.github/workflows/node-package.yml +++ b/.github/workflows/node-package.yml @@ -67,7 +67,9 @@ jobs: # Build Linux prebuilds inside a container with old glibc for backwards compatibility. # Debian 10 contained glibc 2.28 at the time of the writing (2023-06-04): https://packages.debian.org/buster/libc6 - container: debian:10 + # Ubuntu 18.04 is at the End of Standard Support since June 2023, but it contains glibc 2.27, + # so we are using it to support Ubuntu 18.04 setups that are still not upgraded. + container: ubuntu:18.04 steps: # Working directory is owned by 1001:1001 by default. # Change it to our user. From 7b24f9b7a4aee31d453d6c9d324b522c9ae3bd03 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 11 Jul 2023 00:51:00 +0000 Subject: [PATCH 35/50] docs: comment that msgs_status_updates.update_item_read column is unused --- src/sql/migrations.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/migrations.rs b/src/sql/migrations.rs index 7a6e1f2a3..b358adb84 100644 --- a/src/sql/migrations.rs +++ b/src/sql/migrations.rs @@ -516,7 +516,8 @@ DO UPDATE SET rfc724_mid=excluded.rfc724_mid, id INTEGER PRIMARY KEY AUTOINCREMENT, msg_id INTEGER, update_item TEXT DEFAULT '', -update_item_read INTEGER DEFAULT 0); +update_item_read INTEGER DEFAULT 0 -- XXX unused +); CREATE INDEX msgs_status_updates_index1 ON msgs_status_updates (msg_id);"#, 84, ) From 7aac4bfc835148be24209d9744626b8de70dbdd6 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 11 Jul 2023 01:11:08 +0000 Subject: [PATCH 36/50] docs: document WebXDC-related SQL tables --- src/webxdc.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/webxdc.rs b/src/webxdc.rs index 46ada2fab..f01a495da 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -1,4 +1,18 @@ //! # Handle webxdc messages. +//! +//! Internally status updates are stored in the `msgs_status_updates` SQL table. +//! `msgs_status_updates` contains the following columns: +//! - `id` - status update serial number +//! - `msg_id` - ID of the message in the `msgs` table +//! - `update_item` - JSON representation of the status update +//! +//! Status updates are scheduled for sending by adding a record +//! to `smtp_status_updates_table` SQL table. +//! `smtp_status_updates` contains the following columns: +//! - `msg_id` - ID of the message in the `msgs` table +//! - `first_serial` - serial number of the first status update to send +//! - `last_serial` - serial number of the last status update to send +//! - `descr` - text to send along with the updates use std::convert::TryFrom; use std::path::Path; From 27e177dc05ad68d83648ffa34e869076dd1b371a Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 23:59:45 +0000 Subject: [PATCH 37/50] refactor: resultify set_msg_failed() --- src/chat.rs | 4 ++-- src/message.rs | 54 +++++++++++++++++++++++------------------------ src/mimeparser.rs | 2 +- src/smtp.rs | 6 ++++-- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index be163f421..ff35944d8 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -2439,7 +2439,7 @@ async fn create_send_msg_job(context: &Context, msg_id: MsgId) -> Result Ok(res), Err(err) => { - message::set_msg_failed(context, msg_id, &err.to_string()).await; + message::set_msg_failed(context, msg_id, &err.to_string()).await?; Err(err) } }?; @@ -2451,7 +2451,7 @@ async fn create_send_msg_job(context: &Context, msg_id: MsgId) -> Result Result<()> { + let mut msg = Message::load_from_db(context, msg_id).await?; - match context - .sql - .execute( - "UPDATE msgs SET state=?, error=? WHERE id=?;", - (msg.state, error, msg_id), - ) - .await - { - Ok(_) => context.emit_event(EventType::MsgFailed { - chat_id: msg.chat_id, - msg_id, - }), - Err(e) => { - warn!(context, "{:?}", e); - } - } + if msg.state.can_fail() { + msg.state = MessageState::OutFailed; + warn!(context, "{} failed: {}", msg_id, error); + } else { + warn!( + context, + "{} seems to have failed ({}), but state is {}", msg_id, error, msg.state + ) } + + context + .sql + .execute( + "UPDATE msgs SET state=?, error=? WHERE id=?;", + (msg.state, error, msg_id), + ) + .await?; + + context.emit_event(EventType::MsgFailed { + chat_id: msg.chat_id, + msg_id, + }); + + Ok(()) } /// The number of messages assigned to unblocked chats @@ -2284,7 +2282,7 @@ mod tests { update_msg_state(&alice, alice_msg.id, MessageState::OutMdnRcvd).await?; assert_state(&alice, alice_msg.id, MessageState::OutMdnRcvd).await; - set_msg_failed(&alice, alice_msg.id, "badly failed").await; + set_msg_failed(&alice, alice_msg.id, "badly failed").await?; assert_state(&alice, alice_msg.id, MessageState::OutFailed).await; // check incoming message states on receiver side diff --git a/src/mimeparser.rs b/src/mimeparser.rs index 3cd305068..1a5ecbe1e 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -2156,7 +2156,7 @@ async fn handle_ndn( let mut first = true; for msg in msgs { let (msg_id, chat_id, chat_type) = msg?; - set_msg_failed(context, msg_id, &error).await; + set_msg_failed(context, msg_id, &error).await?; if first { // Add only one info msg for all failed messages ndn_maybe_add_info_msg(context, failed, chat_id, chat_type).await?; diff --git a/src/smtp.rs b/src/smtp.rs index 7ae5a737b..ba371da44 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -492,7 +492,9 @@ pub(crate) async fn smtp_send( if let SendResult::Failure(err) = &status { // We couldn't send the message, so mark it as failed - message::set_msg_failed(context, msg_id, &err.to_string()).await; + if let Err(err) = message::set_msg_failed(context, msg_id, &err.to_string()).await { + error!(context, "Failed to mark {msg_id} as failed: {err:#}."); + } } status } @@ -539,7 +541,7 @@ pub(crate) async fn send_msg_to_smtp( ) .await?; if retries > 6 { - message::set_msg_failed(context, msg_id, "Number of retries exceeded the limit.").await; + message::set_msg_failed(context, msg_id, "Number of retries exceeded the limit.").await?; context .sql .execute("DELETE FROM smtp WHERE id=?", (rowid,)) From ee715da078eccba725038b35b756d26e7ebcb1d9 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 22:53:55 +0000 Subject: [PATCH 38/50] fix: do not ignore chat loading errors in forward_msgs() --- src/chat.rs | 143 ++++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 72 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index ff35944d8..3eb1759d8 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3493,89 +3493,88 @@ pub async fn forward_msgs(context: &Context, msg_ids: &[MsgId], chat_id: ChatId) chat_id .unarchive_if_not_muted(context, MessageState::Undefined) .await?; - if let Ok(mut chat) = Chat::load_from_db(context, chat_id).await { - if let Some(reason) = chat.why_cant_send(context).await? { - bail!("cannot send to {}: {}", chat_id, reason); + let mut chat = Chat::load_from_db(context, chat_id).await?; + if let Some(reason) = chat.why_cant_send(context).await? { + bail!("cannot send to {}: {}", chat_id, reason); + } + curr_timestamp = create_smeared_timestamps(context, msg_ids.len()); + let ids = context + .sql + .query_map( + &format!( + "SELECT id FROM msgs WHERE id IN({}) ORDER BY timestamp,id", + sql::repeat_vars(msg_ids.len()) + ), + rusqlite::params_from_iter(msg_ids), + |row| row.get::<_, MsgId>(0), + |ids| ids.collect::, _>>().map_err(Into::into), + ) + .await?; + + for id in ids { + let src_msg_id: MsgId = id; + let mut msg = Message::load_from_db(context, src_msg_id).await?; + if msg.state == MessageState::OutDraft { + bail!("cannot forward drafts."); } - curr_timestamp = create_smeared_timestamps(context, msg_ids.len()); - let ids = context - .sql - .query_map( - &format!( - "SELECT id FROM msgs WHERE id IN({}) ORDER BY timestamp,id", - sql::repeat_vars(msg_ids.len()) - ), - rusqlite::params_from_iter(msg_ids), - |row| row.get::<_, MsgId>(0), - |ids| ids.collect::, _>>().map_err(Into::into), - ) - .await?; - for id in ids { - let src_msg_id: MsgId = id; - let mut msg = Message::load_from_db(context, src_msg_id).await?; - if msg.state == MessageState::OutDraft { - bail!("cannot forward drafts."); - } + let original_param = msg.param.clone(); - let original_param = msg.param.clone(); + // we tested a sort of broadcast + // by not marking own forwarded messages as such, + // however, this turned out to be to confusing and unclear. - // we tested a sort of broadcast - // by not marking own forwarded messages as such, - // however, this turned out to be to confusing and unclear. + if msg.get_viewtype() != Viewtype::Sticker { + msg.param + .set_int(Param::Forwarded, src_msg_id.to_u32() as i32); + } - if msg.get_viewtype() != Viewtype::Sticker { - msg.param - .set_int(Param::Forwarded, src_msg_id.to_u32() as i32); - } + msg.param.remove(Param::GuaranteeE2ee); + msg.param.remove(Param::ForcePlaintext); + msg.param.remove(Param::Cmd); + msg.param.remove(Param::OverrideSenderDisplayname); + msg.param.remove(Param::WebxdcSummary); + msg.param.remove(Param::WebxdcSummaryTimestamp); + msg.in_reply_to = None; - msg.param.remove(Param::GuaranteeE2ee); - msg.param.remove(Param::ForcePlaintext); - msg.param.remove(Param::Cmd); - msg.param.remove(Param::OverrideSenderDisplayname); - msg.param.remove(Param::WebxdcSummary); - msg.param.remove(Param::WebxdcSummaryTimestamp); - msg.in_reply_to = None; + // do not leak data as group names; a default subject is generated by mimefactory + msg.subject = "".to_string(); - // do not leak data as group names; a default subject is generated by mimefactory - msg.subject = "".to_string(); + let new_msg_id: MsgId; + if msg.state == MessageState::OutPreparing { + new_msg_id = chat + .prepare_msg_raw(context, &mut msg, None, curr_timestamp) + .await?; + curr_timestamp += 1; + let save_param = msg.param.clone(); + msg.param = original_param; + msg.id = src_msg_id; - let new_msg_id: MsgId; - if msg.state == MessageState::OutPreparing { - new_msg_id = chat - .prepare_msg_raw(context, &mut msg, None, curr_timestamp) - .await?; - curr_timestamp += 1; - let save_param = msg.param.clone(); - msg.param = original_param; - msg.id = src_msg_id; - - if let Some(old_fwd) = msg.param.get(Param::PrepForwards) { - let new_fwd = format!("{} {}", old_fwd, new_msg_id.to_u32()); - msg.param.set(Param::PrepForwards, new_fwd); - } else { - msg.param - .set(Param::PrepForwards, new_msg_id.to_u32().to_string()); - } - - msg.update_param(context).await?; - msg.param = save_param; + if let Some(old_fwd) = msg.param.get(Param::PrepForwards) { + let new_fwd = format!("{} {}", old_fwd, new_msg_id.to_u32()); + msg.param.set(Param::PrepForwards, new_fwd); } else { - msg.state = MessageState::OutPending; - new_msg_id = chat - .prepare_msg_raw(context, &mut msg, None, curr_timestamp) - .await?; - curr_timestamp += 1; - if create_send_msg_job(context, new_msg_id).await?.is_some() { - context - .scheduler - .interrupt_smtp(InterruptInfo::new(false)) - .await; - } + msg.param + .set(Param::PrepForwards, new_msg_id.to_u32().to_string()); + } + + msg.update_param(context).await?; + msg.param = save_param; + } else { + msg.state = MessageState::OutPending; + new_msg_id = chat + .prepare_msg_raw(context, &mut msg, None, curr_timestamp) + .await?; + curr_timestamp += 1; + if create_send_msg_job(context, new_msg_id).await?.is_some() { + context + .scheduler + .interrupt_smtp(InterruptInfo::new(false)) + .await; } - created_chats.push(chat_id); - created_msgs.push(new_msg_id); } + created_chats.push(chat_id); + created_msgs.push(new_msg_id); } for (chat_id, msg_id) in created_chats.iter().zip(created_msgs.iter()) { context.emit_msgs_changed(*chat_id, *msg_id); From ab1c7ebbe27aaa2b00ded10cc7f8ded2973e47e9 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 22:58:58 +0000 Subject: [PATCH 39/50] refactor: remove unnecessary local variable `save_param` --- src/chat.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 3eb1759d8..5dc00a0f9 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3546,7 +3546,6 @@ pub async fn forward_msgs(context: &Context, msg_ids: &[MsgId], chat_id: ChatId) .prepare_msg_raw(context, &mut msg, None, curr_timestamp) .await?; curr_timestamp += 1; - let save_param = msg.param.clone(); msg.param = original_param; msg.id = src_msg_id; @@ -3559,7 +3558,6 @@ pub async fn forward_msgs(context: &Context, msg_ids: &[MsgId], chat_id: ChatId) } msg.update_param(context).await?; - msg.param = save_param; } else { msg.state = MessageState::OutPending; new_msg_id = chat From 1ba69dbb9bce5ddcab88456583a23d2506ed4472 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 14 Jul 2023 04:28:21 +0000 Subject: [PATCH 40/50] fix: reset MIME type if passed to set_file value is `None` --- src/message.rs | 11 +++-------- src/param.rs | 10 ++++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/message.rs b/src/message.rs index eb01fa55a..f9c39cde4 100644 --- a/src/message.rs +++ b/src/message.rs @@ -980,19 +980,14 @@ impl Message { } } self.param.set(Param::File, file); - if let Some(filemime) = filemime { - self.param.set(Param::MimeType, filemime); - } + self.param.set_optional(Param::MimeType, filemime); } /// Set different sender name for a message. /// This overrides the name set by the `set_config()`-option `displayname`. pub fn set_override_sender_name(&mut self, name: Option) { - if let Some(name) = name { - self.param.set(Param::OverrideSenderDisplayname, name); - } else { - self.param.remove(Param::OverrideSenderDisplayname); - } + self.param + .set_optional(Param::OverrideSenderDisplayname, name); } /// Sets the dimensions of associated image or video file. diff --git a/src/param.rs b/src/param.rs index 8768f996d..d0f3bb1aa 100644 --- a/src/param.rs +++ b/src/param.rs @@ -281,6 +281,16 @@ impl Params { self } + /// Sets the given key from an optional value. + /// Removes the key if the value is `None`. + pub fn set_optional(&mut self, key: Param, value: Option) -> &mut Self { + if let Some(value) = value { + self.set(key, value) + } else { + self.remove(key) + } + } + /// Check if there are any values in this. pub fn is_empty(&self) -> bool { self.inner.is_empty() From 17a6c88cc7f4d774a9ef926943e0bb8cf7af6da7 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 19:31:13 +0000 Subject: [PATCH 41/50] api: add Message.set_file_from_bytes() API --- src/message.rs | 15 +++++++++++++++ src/webxdc.rs | 25 ++++++++++++------------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/message.rs b/src/message.rs index f9c39cde4..8fc785c98 100644 --- a/src/message.rs +++ b/src/message.rs @@ -7,6 +7,7 @@ use anyhow::{ensure, format_err, Context as _, Result}; use deltachat_derive::{FromSql, ToSql}; use serde::{Deserialize, Serialize}; +use crate::blob::BlobObject; use crate::chat::{Chat, ChatId}; use crate::config::Config; use crate::constants::{ @@ -983,6 +984,20 @@ impl Message { self.param.set_optional(Param::MimeType, filemime); } + /// Creates a new blob and sets it as a file associated with a message. + pub async fn set_file_from_bytes( + &mut self, + context: &Context, + suggested_name: &str, + data: &[u8], + filemime: Option<&str>, + ) -> Result<()> { + let blob = BlobObject::create(context, suggested_name, data).await?; + self.param.set(Param::File, blob.as_name()); + self.param.set_optional(Param::MimeType, filemime); + Ok(()) + } + /// Set different sender name for a message. /// This overrides the name set by the `set_config()`-option `displayname`. pub fn set_override_sender_name(&mut self, name: Option) { diff --git a/src/webxdc.rs b/src/webxdc.rs index f01a495da..db9ddf4ab 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -909,10 +909,8 @@ mod tests { } async fn create_webxdc_instance(t: &TestContext, name: &str, bytes: &[u8]) -> Result { - let file = t.get_blobdir().join(name); - tokio::fs::write(&file, bytes).await?; let mut instance = Message::new(Viewtype::File); - instance.set_file(file.to_str().unwrap(), None); + instance.set_file_from_bytes(t, name, bytes, None).await?; Ok(instance) } @@ -940,10 +938,10 @@ mod tests { assert_eq!(instance.chat_id, chat_id); // sending using bad extension is not working, even when setting Viewtype to webxdc - let file = t.get_blobdir().join("index.html"); - tokio::fs::write(&file, b"ola!").await?; let mut instance = Message::new(Viewtype::Webxdc); - instance.set_file(file.to_str().unwrap(), None); + instance + .set_file_from_bytes(&t, "index.html", b"ola!", None) + .await?; assert!(send_msg(&t, chat_id, &mut instance).await.is_err()); Ok(()) @@ -967,14 +965,15 @@ mod tests { assert_eq!(test.viewtype, Viewtype::File); // sending invalid .xdc as Viewtype::Webxdc should fail already on sending - let file = t.get_blobdir().join("invalid2.xdc"); - tokio::fs::write( - &file, - include_bytes!("../test-data/webxdc/invalid-no-zip-but-7z.xdc"), - ) - .await?; let mut instance = Message::new(Viewtype::Webxdc); - instance.set_file(file.to_str().unwrap(), None); + instance + .set_file_from_bytes( + &t, + "invalid2.xdc", + include_bytes!("../test-data/webxdc/invalid-no-zip-but-7z.xdc"), + None, + ) + .await?; assert!(send_msg(&t, chat_id, &mut instance).await.is_err()); Ok(()) From 80fac3f1b8623f11f2e78a158d9759a4f7293c2d Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 7 Jul 2023 21:20:57 +0000 Subject: [PATCH 42/50] refactor: use let-else in resend_msgs() --- src/chat.rs | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 5dc00a0f9..bbf143282 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3604,29 +3604,31 @@ pub async fn resend_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()> { msgs.push(msg) } - if let Some(chat_id) = chat_id { - let chat = Chat::load_from_db(context, chat_id).await?; - for mut msg in msgs { - if msg.get_showpadlock() && !chat.is_protected() { - msg.param.remove(Param::GuaranteeE2ee); - msg.update_param(context).await?; - } - match msg.get_state() { - MessageState::OutFailed | MessageState::OutDelivered | MessageState::OutMdnRcvd => { - message::update_msg_state(context, msg.id, MessageState::OutPending).await? - } - _ => bail!("unexpected message state"), - } - context.emit_event(EventType::MsgsChanged { - chat_id: msg.chat_id, - msg_id: msg.id, - }); - if create_send_msg_job(context, msg.id).await?.is_some() { - context - .scheduler - .interrupt_smtp(InterruptInfo::new(false)) - .await; + let Some(chat_id) = chat_id else { + return Ok(()); + }; + + let chat = Chat::load_from_db(context, chat_id).await?; + for mut msg in msgs { + if msg.get_showpadlock() && !chat.is_protected() { + msg.param.remove(Param::GuaranteeE2ee); + msg.update_param(context).await?; + } + match msg.get_state() { + MessageState::OutFailed | MessageState::OutDelivered | MessageState::OutMdnRcvd => { + message::update_msg_state(context, msg.id, MessageState::OutPending).await? } + _ => bail!("unexpected message state"), + } + context.emit_event(EventType::MsgsChanged { + chat_id: msg.chat_id, + msg_id: msg.id, + }); + if create_send_msg_job(context, msg.id).await?.is_some() { + context + .scheduler + .interrupt_smtp(InterruptInfo::new(false)) + .await; } } Ok(()) From 2fdb9f8b7ea198ea7405214d11053f840957cb92 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 21:17:55 +0000 Subject: [PATCH 43/50] fix: do not ignore errors in `try_calc_and_set_dimensions` --- src/message.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/message.rs b/src/message.rs index 8fc785c98..03ccd70c2 100644 --- a/src/message.rs +++ b/src/message.rs @@ -583,14 +583,22 @@ impl Message { if (self.viewtype == Viewtype::Image || self.viewtype == Viewtype::Gif) && !self.param.exists(Param::Width) { - self.param.set_int(Param::Width, 0); - self.param.set_int(Param::Height, 0); + let buf = read_file(context, &path_and_filename).await?; - if let Ok(buf) = read_file(context, path_and_filename).await { - if let Ok((width, height)) = get_filemeta(&buf) { + match get_filemeta(&buf) { + Ok((width, height)) => { self.param.set_int(Param::Width, width as i32); self.param.set_int(Param::Height, height as i32); } + Err(err) => { + self.param.set_int(Param::Width, 0); + self.param.set_int(Param::Height, 0); + warn!( + context, + "Failed to get width and height for {}: {err:#}.", + path_and_filename.display() + ); + } } if !self.id.is_unset() { From a74b00c3f95a96eb9762cef206b0729814781e9f Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 21:31:15 +0000 Subject: [PATCH 44/50] refactor: move try_calc_and_set_dimensions() call to prepare_msg_blob() --- src/chat.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index bbf143282..a7d2469a1 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -2214,6 +2214,8 @@ async fn prepare_msg_blob(context: &Context, msg: &mut Message) -> Result<()> { } } + msg.try_calc_and_set_dimensions(context).await?; + info!( context, "Attaching \"{}\" for message type #{}.", @@ -2393,9 +2395,6 @@ async fn prepare_send_msg( /// The caller has to interrupt SMTP loop or otherwise process a new row. async fn create_send_msg_job(context: &Context, msg_id: MsgId) -> Result> { let mut msg = Message::load_from_db(context, msg_id).await?; - msg.try_calc_and_set_dimensions(context) - .await - .context("failed to calculate media dimensions")?; /* create message */ let needs_encryption = msg.param.get_bool(Param::GuaranteeE2ee).unwrap_or_default(); @@ -3698,7 +3697,6 @@ pub async fn add_device_msg_with_importance( chat_id = ChatId::get_for_contact(context, ContactId::DEVICE).await?; let rfc724_mid = create_outgoing_rfc724_mid(None, "@device"); - msg.try_calc_and_set_dimensions(context).await.ok(); prepare_msg_blob(context, msg).await?; let timestamp_sent = create_smeared_timestamp(context); From dc4396a699296c6ffd45c2bcf0b1a642eca005d1 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 23:23:42 +0000 Subject: [PATCH 45/50] fix: update passed by reference Message in prepare_msg_raw() --- src/chat.rs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index a7d2469a1..386814822 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1713,6 +1713,11 @@ impl Chat { None }; + msg.chat_id = self.id; + msg.from_id = ContactId::SELF; + msg.rfc724_mid = new_rfc724_mid; + msg.timestamp_sort = timestamp; + // add message to the database if let Some(update_msg_id) = update_msg_id { context @@ -1726,11 +1731,11 @@ impl Chat { ephemeral_timestamp=? WHERE id=?;", params_slice![ - new_rfc724_mid, - self.id, - ContactId::SELF, + msg.rfc724_mid, + msg.chat_id, + msg.from_id, to_id, - timestamp, + msg.timestamp_sort, msg.viewtype, msg.state, msg.text, @@ -1775,11 +1780,11 @@ impl Chat { ephemeral_timestamp) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,1,?,?,?);", params_slice![ - new_rfc724_mid, - self.id, - ContactId::SELF, + msg.rfc724_mid, + msg.chat_id, + msg.from_id, to_id, - timestamp, + msg.timestamp_sort, msg.viewtype, msg.state, msg.text, From d5c5ff8b3f2685d6b04baeacccc850e883d7896d Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 8 Jul 2023 22:00:40 +0000 Subject: [PATCH 46/50] refactor: accept &mut Message in create_send_msg_job() --- src/chat.rs | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 386814822..ab8263468 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -2388,7 +2388,7 @@ async fn prepare_send_msg( ); message::update_msg_state(context, msg.id, MessageState::OutPending).await?; } - let row_id = create_send_msg_job(context, msg.id).await?; + let row_id = create_send_msg_job(context, msg).await?; Ok(row_id) } @@ -2398,10 +2398,10 @@ async fn prepare_send_msg( /// group with only self and no BCC-to-self configured. /// /// The caller has to interrupt SMTP loop or otherwise process a new row. -async fn create_send_msg_job(context: &Context, msg_id: MsgId) -> Result> { - let mut msg = Message::load_from_db(context, msg_id).await?; - - /* create message */ +pub(crate) async fn create_send_msg_job( + context: &Context, + msg: &mut Message, +) -> Result> { let needs_encryption = msg.param.get_bool(Param::GuaranteeE2ee).unwrap_or_default(); let attach_selfavatar = match shall_attach_selfavatar(context, msg.chat_id).await { @@ -2412,7 +2412,7 @@ async fn create_send_msg_job(context: &Context, msg_id: MsgId) -> Result Result Ok(res), Err(err) => { - message::set_msg_failed(context, msg_id, &err.to_string()).await?; + message::set_msg_failed(context, msg.id, &err.to_string()).await?; Err(err) } }?; @@ -2452,13 +2453,13 @@ async fn create_send_msg_job(context: &Context, msg_id: MsgId) -> Result Result Result<()> { chat_id: msg.chat_id, msg_id: msg.id, }); - if create_send_msg_job(context, msg.id).await?.is_some() { + if create_send_msg_job(context, &mut msg).await?.is_some() { context .scheduler .interrupt_smtp(InterruptInfo::new(false)) From d6b7ee04a093f3fd5572b7416c815a78c394d6f0 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 11 Jul 2023 15:50:11 +0000 Subject: [PATCH 47/50] docs: document `range` argument of `render_webxdc_status_update_object()` --- src/webxdc.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webxdc.rs b/src/webxdc.rs index db9ddf4ab..4697f025b 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -679,6 +679,10 @@ impl Context { /// /// Example: `{"updates": [{"payload":"any update data"}, /// {"payload":"another update data"}]}` + /// + /// `range` is an optional range of status update serials to send. + /// If it is `None`, all updates are sent. + /// This is used when a message is resent using [`crate::chat::resend_msgs`]. pub(crate) async fn render_webxdc_status_update_object( &self, instance_msg_id: MsgId, From 087f6edd0ca17beec4ffad5f77f96e75b428b3b8 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 14 Jul 2023 04:19:54 +0000 Subject: [PATCH 48/50] refactor: make set_msg_failed accept &mut Message instead of MsgId --- src/chat.rs | 4 ++-- src/message.rs | 19 +++++++++++-------- src/mimeparser.rs | 7 +++++-- src/smtp.rs | 18 +++++++++++++++--- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index ab8263468..9baa7fdb1 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -2444,7 +2444,7 @@ pub(crate) async fn create_send_msg_job( let rendered_msg = match mimefactory.render(context).await { Ok(res) => Ok(res), Err(err) => { - message::set_msg_failed(context, msg.id, &err.to_string()).await?; + message::set_msg_failed(context, msg, &err.to_string()).await?; Err(err) } }?; @@ -2453,7 +2453,7 @@ pub(crate) async fn create_send_msg_job( /* unrecoverable */ message::set_msg_failed( context, - msg.id, + msg, "End-to-end-encryption unavailable unexpectedly.", ) .await?; diff --git a/src/message.rs b/src/message.rs index 03ccd70c2..0a299c3e9 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1667,30 +1667,33 @@ pub(crate) async fn update_msg_state( // Context functions to work with messages -pub(crate) async fn set_msg_failed(context: &Context, msg_id: MsgId, error: &str) -> Result<()> { - let mut msg = Message::load_from_db(context, msg_id).await?; - +pub(crate) async fn set_msg_failed( + context: &Context, + msg: &mut Message, + error: &str, +) -> Result<()> { if msg.state.can_fail() { msg.state = MessageState::OutFailed; - warn!(context, "{} failed: {}", msg_id, error); + warn!(context, "{} failed: {}", msg.id, error); } else { warn!( context, - "{} seems to have failed ({}), but state is {}", msg_id, error, msg.state + "{} seems to have failed ({}), but state is {}", msg.id, error, msg.state ) } + msg.error = Some(error.to_string()); context .sql .execute( "UPDATE msgs SET state=?, error=? WHERE id=?;", - (msg.state, error, msg_id), + (msg.state, error, msg.id), ) .await?; context.emit_event(EventType::MsgFailed { chat_id: msg.chat_id, - msg_id, + msg_id: msg.id, }); Ok(()) @@ -2300,7 +2303,7 @@ mod tests { update_msg_state(&alice, alice_msg.id, MessageState::OutMdnRcvd).await?; assert_state(&alice, alice_msg.id, MessageState::OutMdnRcvd).await; - set_msg_failed(&alice, alice_msg.id, "badly failed").await?; + set_msg_failed(&alice, &mut alice_msg, "badly failed").await?; assert_state(&alice, alice_msg.id, MessageState::OutFailed).await; // check incoming message states on receiver side diff --git a/src/mimeparser.rs b/src/mimeparser.rs index 1a5ecbe1e..73952ba8b 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -29,7 +29,9 @@ use crate::events::EventType; use crate::headerdef::{HeaderDef, HeaderDefMap}; use crate::key::{DcKey, Fingerprint, SignedPublicKey, SignedSecretKey}; use crate::keyring::Keyring; -use crate::message::{self, set_msg_failed, update_msg_state, MessageState, MsgId, Viewtype}; +use crate::message::{ + self, set_msg_failed, update_msg_state, Message, MessageState, MsgId, Viewtype, +}; use crate::param::{Param, Params}; use crate::peerstate::Peerstate; use crate::simplify::{simplify, SimplifiedText}; @@ -2156,7 +2158,8 @@ async fn handle_ndn( let mut first = true; for msg in msgs { let (msg_id, chat_id, chat_type) = msg?; - set_msg_failed(context, msg_id, &error).await?; + let mut message = Message::load_from_db(context, msg_id).await?; + set_msg_failed(context, &mut message, &error).await?; if first { // Add only one info msg for all failed messages ndn_maybe_add_info_msg(context, failed, chat_id, chat_type).await?; diff --git a/src/smtp.rs b/src/smtp.rs index ba371da44..e9ebf3faa 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -492,8 +492,19 @@ pub(crate) async fn smtp_send( if let SendResult::Failure(err) = &status { // We couldn't send the message, so mark it as failed - if let Err(err) = message::set_msg_failed(context, msg_id, &err.to_string()).await { - error!(context, "Failed to mark {msg_id} as failed: {err:#}."); + match Message::load_from_db(context, msg_id).await { + Ok(mut msg) => { + if let Err(err) = message::set_msg_failed(context, &mut msg, &err.to_string()).await + { + error!(context, "Failed to mark {msg_id} as failed: {err:#}."); + } + } + Err(err) => { + error!( + context, + "Failed to load {msg_id} to mark it as failed: {err:#}." + ); + } } } status @@ -541,7 +552,8 @@ pub(crate) async fn send_msg_to_smtp( ) .await?; if retries > 6 { - message::set_msg_failed(context, msg_id, "Number of retries exceeded the limit.").await?; + let mut msg = Message::load_from_db(context, msg_id).await?; + message::set_msg_failed(context, &mut msg, "Number of retries exceeded the limit.").await?; context .sql .execute("DELETE FROM smtp WHERE id=?", (rowid,)) From a8551510cdb5be7a35ebd3574df79d15a4fa471a Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 6 Sep 2023 20:53:00 +0000 Subject: [PATCH 49/50] chore(release): prepare for 1.121.0 --- CHANGELOG.md | 23 +++++++++++++++++++++++ Cargo.lock | 10 +++++----- Cargo.toml | 2 +- deltachat-ffi/Cargo.toml | 2 +- deltachat-jsonrpc/Cargo.toml | 2 +- deltachat-jsonrpc/typescript/package.json | 2 +- deltachat-repl/Cargo.toml | 2 +- deltachat-rpc-server/Cargo.toml | 2 +- package.json | 2 +- release-date.in | 2 +- 10 files changed, 36 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e54a6826..d4c1e029d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.121.0] - 2023-09-06 + +### API-Changes + +- Add `dc_context_change_passphrase()`. +- Add `Message.set_file_from_bytes()` API. +- Add experimental API to get similar chats. + +### Build system + +- Build node packages on Ubuntu 18.04 instead of Debian 10. + This reduces the requirement for glibc version from 2.28 to 2.27. + +### Fixes + +- Allow membership changes by a MUA if we're not in the group ([#4624](https://github.com/deltachat/deltachat-core-rust/pull/4624)). +- Save mime headers for messages not signed with a known key ([#4557](https://github.com/deltachat/deltachat-core-rust/pull/4557)). +- Return from `dc_get_chatlist(DC_GCL_FOR_FORWARDING)` only chats where we can send ([#4616](https://github.com/deltachat/deltachat-core-rust/pull/4616)). +- Do not allow dots at the end of email addresses. +- deltachat-rpc-client: Remove `aiodns` optional dependency from required dependencies. + `aiodns` depends on `pycares` which [fails to install in Termux](https://github.com/saghul/aiodns/issues/98). + ## [1.120.0] - 2023-08-28 ### API-Changes @@ -2764,3 +2786,4 @@ https://github.com/deltachat/deltachat-core-rust/pulls?q=is%3Apr+is%3Aclosed [1.119.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.118.0...v1.119.0 [1.119.1]: https://github.com/deltachat/deltachat-core-rust/compare/v1.119.0...v1.119.1 [1.120.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.119.1...v1.120.0 +[1.121.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.120.0...v1.121.0 diff --git a/Cargo.lock b/Cargo.lock index 1f09a5f93..1e9b02504 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "deltachat" -version = "1.120.0" +version = "1.121.0" dependencies = [ "ansi_term", "anyhow", @@ -1179,7 +1179,7 @@ dependencies = [ [[package]] name = "deltachat-jsonrpc" -version = "1.120.0" +version = "1.121.0" dependencies = [ "anyhow", "async-channel", @@ -1203,7 +1203,7 @@ dependencies = [ [[package]] name = "deltachat-repl" -version = "1.120.0" +version = "1.121.0" dependencies = [ "ansi_term", "anyhow", @@ -1218,7 +1218,7 @@ dependencies = [ [[package]] name = "deltachat-rpc-server" -version = "1.120.0" +version = "1.121.0" dependencies = [ "anyhow", "deltachat", @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "deltachat_ffi" -version = "1.120.0" +version = "1.121.0" dependencies = [ "anyhow", "deltachat", diff --git a/Cargo.toml b/Cargo.toml index 25b1ea712..1f0e90284 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat" -version = "1.120.0" +version = "1.121.0" edition = "2021" license = "MPL-2.0" rust-version = "1.65" diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml index 546fec81d..5bafbc735 100644 --- a/deltachat-ffi/Cargo.toml +++ b/deltachat-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat_ffi" -version = "1.120.0" +version = "1.121.0" description = "Deltachat FFI" edition = "2018" readme = "README.md" diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index f6f35f0a2..2c69a8f6c 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-jsonrpc" -version = "1.120.0" +version = "1.121.0" description = "DeltaChat JSON-RPC API" edition = "2021" default-run = "deltachat-jsonrpc-server" diff --git a/deltachat-jsonrpc/typescript/package.json b/deltachat-jsonrpc/typescript/package.json index 0c0e4b6bd..3f3fd3d16 100644 --- a/deltachat-jsonrpc/typescript/package.json +++ b/deltachat-jsonrpc/typescript/package.json @@ -55,5 +55,5 @@ }, "type": "module", "types": "dist/deltachat.d.ts", - "version": "1.120.0" + "version": "1.121.0" } diff --git a/deltachat-repl/Cargo.toml b/deltachat-repl/Cargo.toml index 32402d1d0..beb8e8db1 100644 --- a/deltachat-repl/Cargo.toml +++ b/deltachat-repl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-repl" -version = "1.120.0" +version = "1.121.0" license = "MPL-2.0" edition = "2021" diff --git a/deltachat-rpc-server/Cargo.toml b/deltachat-rpc-server/Cargo.toml index 2b446d99b..172922a15 100644 --- a/deltachat-rpc-server/Cargo.toml +++ b/deltachat-rpc-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-rpc-server" -version = "1.120.0" +version = "1.121.0" description = "DeltaChat JSON-RPC server" edition = "2021" readme = "README.md" diff --git a/package.json b/package.json index 46f77993d..779fe9c0e 100644 --- a/package.json +++ b/package.json @@ -60,5 +60,5 @@ "test:mocha": "mocha -r esm node/test/test.js --growl --reporter=spec --bail --exit" }, "types": "node/dist/index.d.ts", - "version": "1.120.0" + "version": "1.121.0" } diff --git a/release-date.in b/release-date.in index 13b929383..1cef16d38 100644 --- a/release-date.in +++ b/release-date.in @@ -1 +1 @@ -2023-08-28 \ No newline at end of file +2023-09-06 \ No newline at end of file From 4a0585404a0a5f2e3edb4257a69d63efeb199ef3 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 8 Sep 2023 07:00:18 +0000 Subject: [PATCH 50/50] chore(cargo): bump webpki from 0.22.0 to 0.22.1 --- Cargo.lock | 4 ++-- deny.toml | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b73af324..e2008e24f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5380,9 +5380,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", diff --git a/deny.toml b/deny.toml index 8c5fb1dd5..22d06bab4 100644 --- a/deny.toml +++ b/deny.toml @@ -3,11 +3,6 @@ unmaintained = "allow" ignore = [ "RUSTSEC-2020-0071", "RUSTSEC-2022-0093", - - # Exponential CPU time usage for TLS certificate processing in webpki. - # It is only used for backup transfer, so does not affect IMAP and SMTP connections. - # Waiting for `iroh` to update dependencies. - "RUSTSEC-2023-0052", ] [bans]