fix: add aws-lc-rs feature to lettre to avoid smtp client initialization error (#8691)

### **PR Type**
Bug fix, Configuration changes


___

### **Description**
- Enable `aws-lc-rs` for `lettre`

- Prevent SMTP client init errors

- Adjust Cargo features for TLS backend


___

### Diagram Walkthrough


```mermaid
flowchart LR
  cargo["Cargo.toml dependencies"]
  lettre["lettre crate features"]
  smtp["SMTP client initialization"]

  cargo -- "enable aws-lc-rs feature" --> lettre
  lettre -- "stronger TLS backend" --> smtp
  smtp -- "avoid init errors" --> smtp
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>Cargo.toml</strong><dd><code>Enable aws-lc-rs feature
for lettre</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

Cargo.toml

<ul><li>Add <code>aws-lc-rs</code> to <code>lettre</code> features.<br>
<li> Keep existing <code>tokio1-rustls-tls</code> and pool
settings.</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8691/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
This commit is contained in:
Subhra264
2025-10-03 10:01:52 +05:30
committed by GitHub
parent 91bbbc91ed
commit 9d357d0b8f
2 changed files with 123 additions and 17 deletions
Generated
+122 -17
View File
@@ -194,7 +194,7 @@ dependencies = [
"tokio-rustls 0.26.1",
"tokio-util",
"tracing",
"webpki-roots",
"webpki-roots 0.26.7",
]
[[package]]
@@ -1149,6 +1149,30 @@ dependencies = [
"zeroize",
]
[[package]]
name = "aws-lc-rs"
version = "1.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d"
dependencies = [
"aws-lc-sys",
"zeroize",
]
[[package]]
name = "aws-lc-sys"
version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ba2e2516bdf37af57fc6ff047855f54abad0066e5c4fdaaeb76dabb2e05bcf5"
dependencies = [
"bindgen",
"cc",
"cmake",
"dunce",
"fs_extra",
"libloading",
]
[[package]]
name = "aws-runtime"
version = "1.5.5"
@@ -1624,6 +1648,26 @@ dependencies = [
"serde",
]
[[package]]
name = "bindgen"
version = "0.72.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
dependencies = [
"bitflags 2.9.0",
"cexpr",
"clang-sys",
"itertools 0.13.0",
"log",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
"syn 2.0.106",
]
[[package]]
name = "bit-set"
version = "0.8.0"
@@ -1975,10 +2019,11 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.16"
version = "1.2.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f"
dependencies = [
"find-msvc-tools",
"jobserver",
"libc",
"shlex",
@@ -1996,6 +2041,15 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cexpr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom 7.1.3",
]
[[package]]
name = "cfb-mode"
version = "0.8.2"
@@ -2238,6 +2292,17 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ceab37c9e94f42414cccae77e930232c517f1bb190947018cffb0ab41fc40992"
[[package]]
name = "clang-sys"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
dependencies = [
"glob",
"libc",
"libloading",
]
[[package]]
name = "clap"
version = "4.5.23"
@@ -2323,6 +2388,15 @@ dependencies = [
"digest",
]
[[package]]
name = "cmake"
version = "0.1.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
dependencies = [
"cc",
]
[[package]]
name = "codespan-reporting"
version = "0.12.0"
@@ -3919,9 +3993,9 @@ dependencies = [
[[package]]
name = "email-encoding"
version = "0.3.1"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea3d894bbbab314476b265f9b2d46bf24b123a36dd0e96b06a1b49545b9d9dcc"
checksum = "9298e6504d9b9e780ed3f7dfd43a61be8cd0e09eb07f7706a945b0072b6670b6"
dependencies = [
"base64 0.22.1",
"memchr",
@@ -4169,6 +4243,12 @@ dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "find-msvc-tools"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959"
[[package]]
name = "findshlibs"
version = "0.10.2"
@@ -4312,6 +4392,12 @@ dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "funty"
version = "2.0.0"
@@ -4902,7 +4988,7 @@ dependencies = [
"tokio",
"tokio-rustls 0.26.1",
"tower-service",
"webpki-roots",
"webpki-roots 0.26.7",
]
[[package]]
@@ -5569,9 +5655,9 @@ dependencies = [
[[package]]
name = "lettre"
version = "0.11.11"
version = "0.11.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab4c9a167ff73df98a5ecc07e8bf5ce90b583665da3d1762eb1f775ad4d0d6f5"
checksum = "5cb54db6ff7a89efac87dba5baeac57bb9ccd726b49a9b6f21fb92b3966aaf56"
dependencies = [
"async-trait",
"base64 0.22.1",
@@ -5585,17 +5671,15 @@ dependencies = [
"httpdate",
"idna",
"mime",
"nom 7.1.3",
"nom 8.0.0",
"percent-encoding",
"quoted_printable",
"rustls 0.23.20",
"rustls-pemfile 2.2.0",
"rustls-pki-types",
"socket2 0.5.8",
"socket2 0.6.0",
"tokio",
"tokio-rustls 0.26.1",
"url",
"webpki-roots",
"webpki-roots 1.0.2",
]
[[package]]
@@ -5700,6 +5784,16 @@ dependencies = [
"rle-decode-fast",
]
[[package]]
name = "libloading"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
]
[[package]]
name = "libm"
version = "0.2.11"
@@ -8389,7 +8483,7 @@ dependencies = [
"wasm-bindgen-futures",
"wasm-streams",
"web-sys",
"webpki-roots",
"webpki-roots 0.26.7",
"windows-registry",
]
@@ -8737,6 +8831,7 @@ version = "0.23.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
dependencies = [
"aws-lc-rs",
"log",
"once_cell",
"ring",
@@ -8826,6 +8921,7 @@ version = "0.102.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
dependencies = [
"aws-lc-rs",
"ring",
"rustls-pki-types",
"untrusted",
@@ -9579,7 +9675,7 @@ dependencies = [
"tracing",
"url",
"uuid",
"webpki-roots",
"webpki-roots 0.26.7",
]
[[package]]
@@ -10418,7 +10514,7 @@ dependencies = [
"tokio",
"tokio-rustls 0.26.1",
"tokio-util",
"webpki-roots",
"webpki-roots 0.26.7",
]
[[package]]
@@ -10508,7 +10604,7 @@ dependencies = [
"tower-layer",
"tower-service",
"tracing",
"webpki-roots",
"webpki-roots 0.26.7",
]
[[package]]
@@ -11390,6 +11486,15 @@ dependencies = [
"rustls-pki-types",
]
[[package]]
name = "webpki-roots"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2"
dependencies = [
"rustls-pki-types",
]
[[package]]
name = "which"
version = "6.0.3"
+1
View File
@@ -283,6 +283,7 @@ lettre = { version = "0.11", default-features = false, features = [
"pool",
"tokio1",
"tokio1-rustls-tls",
"aws-lc-rs"
] }
log = "0.4"
md5 = "0.8.0"