Compare commits

..

22 Commits

Author SHA1 Message Date
73d7dd0da6 fix(deps): update all non-major dependencies
Some checks failed
Continuous integration / Check (push) Successful in 1m40s
Continuous integration / Test Suite (push) Failing after 2m42s
Continuous integration / Trunk (push) Successful in 7m16s
Continuous integration / Rustfmt (push) Failing after 45s
Continuous integration / build (push) Successful in 2m45s
Continuous integration / Disallow unused dependencies (push) Failing after 27m59s
2025-08-19 04:32:16 +00:00
834e873862 chore: Release
Some checks failed
Continuous integration / Check (push) Successful in 1m0s
Continuous integration / Test Suite (push) Failing after 1m36s
Continuous integration / Trunk (push) Successful in 54s
Continuous integration / Rustfmt (push) Failing after 38s
Continuous integration / build (push) Successful in 1m35s
Continuous integration / Disallow unused dependencies (push) Failing after 27m45s
2025-08-18 10:16:15 -07:00
6c07b18eec server: add envelope_to support to DMARC report 2025-08-18 10:15:17 -07:00
b191bcbddf chore: Release
Some checks failed
Continuous integration / Check (push) Successful in 51s
Continuous integration / Test Suite (push) Failing after 1m10s
Continuous integration / Trunk (push) Successful in 1m19s
Continuous integration / Rustfmt (push) Failing after 40s
Continuous integration / build (push) Successful in 1m45s
Continuous integration / Disallow unused dependencies (push) Failing after 27m44s
2025-08-15 14:02:20 -07:00
a1be436209 server: address lint 2025-08-15 14:01:14 -07:00
5b471b278c server: fix tests 2025-08-15 13:58:53 -07:00
34bda32e30 chore: Release
Some checks failed
Continuous integration / Check (push) Successful in 49s
Continuous integration / Test Suite (push) Failing after 1m5s
Continuous integration / Trunk (push) Successful in 7m19s
Continuous integration / Rustfmt (push) Failing after 40s
Continuous integration / build (push) Successful in 1m28s
Continuous integration / Disallow unused dependencies (push) Failing after 27m34s
2025-08-13 16:07:44 -07:00
501ee417c9 server: address lint 2025-08-13 16:07:35 -07:00
ecc0a88341 chore: Release 2025-08-13 16:05:02 -07:00
d36d508df0 server: move email extraction code into separate mod 2025-08-13 10:36:50 -07:00
b9b12dd717 chore: Release
Some checks failed
Continuous integration / Check (push) Successful in 57s
Continuous integration / Test Suite (push) Successful in 1m14s
Continuous integration / Trunk (push) Successful in 1m55s
Continuous integration / Rustfmt (push) Failing after 42s
Continuous integration / build (push) Successful in 1m42s
Continuous integration / Disallow unused dependencies (push) Failing after 27m35s
2025-08-12 17:04:27 -07:00
633e055472 cargo sqlx prepare 2025-08-12 17:04:25 -07:00
951ee70279 server: don't duplicate dmarc table for google 2025-08-12 17:04:03 -07:00
3a41ab1767 server: much improved xmls pretty printer 2025-08-12 17:04:03 -07:00
5c9955a89e server: fix raw dmarc extraction for non-Google domains 2025-08-12 17:04:03 -07:00
1f75627fd2 server: fix is_dmarc check 2025-08-12 17:04:03 -07:00
5c42d04598 server: pretty print raw TLSRPT and DMARC data 2025-08-12 17:04:03 -07:00
4d888fbea3 server: more TLS report support and minor refactoring 2025-08-12 17:04:03 -07:00
8f53678e53 server: TLS report support 2025-08-12 17:04:03 -07:00
8218fca2ef server: include reason in dmarc report 2025-08-12 17:04:03 -07:00
01164d6afa Merge pull request 'fix(deps): update all non-major dependencies' (#148) from renovate/all-minor-patch into master
Some checks failed
Continuous integration / Check (push) Successful in 56s
Continuous integration / Test Suite (push) Successful in 1m14s
Continuous integration / Trunk (push) Successful in 7m29s
Continuous integration / Rustfmt (push) Successful in 40s
Continuous integration / build (push) Successful in 1m23s
Continuous integration / Disallow unused dependencies (push) Failing after 27m44s
2025-08-11 18:15:48 -07:00
2f06ae93ae fix(deps): update all non-major dependencies
All checks were successful
Continuous integration / Check (push) Successful in 1m9s
Continuous integration / Test Suite (push) Successful in 1m49s
Continuous integration / Trunk (push) Successful in 1m0s
Continuous integration / Rustfmt (push) Successful in 40s
Continuous integration / build (push) Successful in 2m6s
Continuous integration / Disallow unused dependencies (push) Successful in 2m12s
2025-08-11 23:32:19 +00:00
18 changed files with 1792 additions and 1063 deletions

209
Cargo.lock generated
View File

@@ -70,8 +70,8 @@ version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6b346764dd0814805de8abf899fe03065bcee69bb1a4771c785817e39f3978f"
dependencies = [
"cssparser 0.35.0",
"html5ever 0.35.0",
"cssparser",
"html5ever",
"maplit",
"tendril",
"url",
@@ -144,9 +144,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.98"
version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"
[[package]]
name = "anymap"
@@ -351,9 +351,9 @@ dependencies = [
[[package]]
name = "async-trait"
version = "0.1.88"
version = "0.1.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
dependencies = [
"proc-macro2",
"quote",
@@ -756,7 +756,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b409ed3b3b89db66e81ed7df221d30a1d78c298e719472cac30b21dfdacf9ce"
dependencies = [
"chrono",
"derive_more 2.0.1",
"derive_more",
"semver 1.0.26",
"serde",
]
@@ -854,7 +854,7 @@ dependencies = [
"rusoto_s3 0.48.0",
"serde",
"sqlx",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tokio 1.47.1",
"tracing",
"urlencoding",
@@ -906,7 +906,7 @@ dependencies = [
"semver 1.0.26",
"serde",
"serde_json",
"thiserror 2.0.13",
"thiserror 2.0.15",
]
[[package]]
@@ -981,9 +981,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.44"
version = "4.5.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c1f056bae57e3e54c3375c41ff79619ddd13460a17d7438712bd0d83fda4ff8"
checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1003,9 +1003,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.5.41"
version = "4.5.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -1342,8 +1342,8 @@ version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30983955a71311b6268dca9ea211b75136367ab3ed7d27d78617587d7d9beebf"
dependencies = [
"cssparser 0.35.0",
"html5ever 0.35.0",
"cssparser",
"html5ever",
"indexmap 2.10.0",
"lru 0.16.0",
"precomputed-hash",
@@ -1355,19 +1355,6 @@ dependencies = [
"url",
]
[[package]]
name = "cssparser"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7c66d1cd8ed61bf80b38432613a7a2f09401ab8d0501110655f8b341484a3e3"
dependencies = [
"cssparser-macros",
"dtoa-short",
"itoa 1.0.15",
"phf",
"smallvec 1.15.1",
]
[[package]]
name = "cssparser"
version = "0.35.0"
@@ -1540,17 +1527,6 @@ dependencies = [
"syn 2.0.104",
]
[[package]]
name = "derive_more"
version = "0.99.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.104",
]
[[package]]
name = "derive_more"
version = "2.0.1"
@@ -1751,7 +1727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
dependencies = [
"libc",
"windows-sys 0.52.0",
"windows-sys 0.60.2",
]
[[package]]
@@ -2518,18 +2494,6 @@ dependencies = [
"utf8-width",
]
[[package]]
name = "html5ever"
version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c"
dependencies = [
"log",
"mac",
"markup5ever 0.14.1",
"match_token 0.1.0",
]
[[package]]
name = "html5ever"
version = "0.35.0"
@@ -2537,8 +2501,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4"
dependencies = [
"log",
"markup5ever 0.35.0",
"match_token 0.35.0",
"markup5ever",
"match_token",
]
[[package]]
@@ -3165,13 +3129,13 @@ dependencies = [
"mailparse",
"serde",
"serde_json",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tracing",
]
[[package]]
name = "letterbox-notmuch"
version = "0.17.29"
version = "0.17.34"
dependencies = [
"itertools",
"log",
@@ -3180,13 +3144,13 @@ dependencies = [
"rayon",
"serde",
"serde_json",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tracing",
]
[[package]]
name = "letterbox-procmail2notmuch"
version = "0.17.29"
version = "0.17.34"
dependencies = [
"anyhow",
"clap",
@@ -3199,7 +3163,7 @@ dependencies = [
[[package]]
name = "letterbox-server"
version = "0.17.29"
version = "0.17.34"
dependencies = [
"ammonia",
"anyhow",
@@ -3219,8 +3183,8 @@ dependencies = [
"futures 0.3.31",
"headers",
"html-escape",
"letterbox-notmuch 0.17.29",
"letterbox-shared 0.17.29",
"letterbox-notmuch 0.17.34",
"letterbox-shared 0.17.34",
"linkify",
"lol_html",
"mailparse",
@@ -3234,7 +3198,7 @@ dependencies = [
"serde_json",
"sqlx",
"tantivy",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tokio 1.47.1",
"tower-http",
"tracing",
@@ -3261,10 +3225,10 @@ dependencies = [
[[package]]
name = "letterbox-shared"
version = "0.17.29"
version = "0.17.34"
dependencies = [
"build-info",
"letterbox-notmuch 0.17.29",
"letterbox-notmuch 0.17.34",
"regex",
"serde",
"sqlx",
@@ -3274,7 +3238,7 @@ dependencies = [
[[package]]
name = "letterbox-web"
version = "0.17.29"
version = "0.17.34"
dependencies = [
"build-info",
"build-info-build",
@@ -3286,14 +3250,14 @@ dependencies = [
"graphql_client",
"human_format",
"itertools",
"letterbox-shared 0.17.29",
"letterbox-shared 0.17.34",
"log",
"seed",
"seed_hooks",
"serde",
"serde_json",
"strum_macros 0.27.2",
"thiserror 2.0.13",
"thiserror 2.0.15",
"uuid",
"wasm-bindgen",
"wasm-bindgen-test",
@@ -3458,14 +3422,14 @@ checksum = "b63d49c99bfbf3400dd6450e516515b7014fcb49b5cb533f4b725a00c1462a36"
dependencies = [
"bitflags 2.9.1",
"cfg-if 1.0.1",
"cssparser 0.35.0",
"cssparser",
"encoding_rs",
"hashbrown 0.15.5",
"memchr",
"mime",
"precomputed-hash",
"selectors 0.30.0",
"thiserror 2.0.13",
"thiserror 2.0.15",
]
[[package]]
@@ -3521,20 +3485,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
[[package]]
name = "markup5ever"
version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18"
dependencies = [
"log",
"phf",
"phf_codegen",
"string_cache",
"string_cache_codegen",
"tendril",
]
[[package]]
name = "markup5ever"
version = "0.35.0"
@@ -3546,17 +3496,6 @@ dependencies = [
"web_atoms",
]
[[package]]
name = "match_token"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.104",
]
[[package]]
name = "match_token"
version = "0.35.0"
@@ -4044,7 +3983,7 @@ dependencies = [
"futures-sink",
"js-sys",
"pin-project-lite",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tracing",
]
@@ -4076,7 +4015,7 @@ dependencies = [
"opentelemetry_sdk",
"prost",
"reqwest",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tokio 1.47.1",
"tonic",
"tracing",
@@ -4108,7 +4047,7 @@ dependencies = [
"percent-encoding",
"rand 0.9.2",
"serde_json",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tokio 1.47.1",
"tokio-stream",
"tracing",
@@ -4265,7 +4204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323"
dependencies = [
"memchr",
"thiserror 2.0.13",
"thiserror 2.0.15",
"ucd-trie",
]
@@ -4589,7 +4528,7 @@ dependencies = [
"rustc-hash",
"rustls",
"socket2 0.5.10",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tokio 1.47.1",
"tracing",
"web-time",
@@ -4610,7 +4549,7 @@ dependencies = [
"rustls",
"rustls-pki-types",
"slab",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tinyvec",
"tracing",
"web-time",
@@ -4733,9 +4672,9 @@ dependencies = [
[[package]]
name = "rayon"
version = "1.10.0"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
dependencies = [
"either",
"rayon-core",
@@ -4743,9 +4682,9 @@ dependencies = [
[[package]]
name = "rayon-core"
version = "1.12.1"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
dependencies = [
"crossbeam-deque 0.8.6",
"crossbeam-utils 0.8.21",
@@ -4861,9 +4800,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "reqwest"
version = "0.12.22"
version = "0.12.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531"
checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb"
dependencies = [
"base64 0.22.1",
"bytes 1.10.1",
@@ -5178,7 +5117,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.9.4",
"windows-sys 0.52.0",
"windows-sys 0.60.2",
]
[[package]]
@@ -5285,16 +5224,16 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "scraper"
version = "0.23.1"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "527e65d9d888567588db4c12da1087598d0f6f8b346cc2c5abc91f05fc2dffe2"
checksum = "e5f3a24d916e78954af99281a455168d4a9515d65eca99a18da1b813689c4ad9"
dependencies = [
"cssparser 0.34.0",
"cssparser",
"ego-tree",
"getopts",
"html5ever 0.29.1",
"html5ever",
"precomputed-hash",
"selectors 0.26.0",
"selectors 0.31.0",
"tendril",
]
@@ -5373,13 +5312,13 @@ dependencies = [
[[package]]
name = "selectors"
version = "0.26.0"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd568a4c9bb598e291a08244a5c1f5a8a6650bee243b5b0f8dbb3d9cc1d87fe8"
checksum = "3df44ba8a7ca7a4d28c589e04f526266ed76b6cc556e33fe69fa25de31939a65"
dependencies = [
"bitflags 2.9.1",
"cssparser 0.34.0",
"derive_more 0.99.20",
"cssparser",
"derive_more",
"fxhash",
"log",
"new_debug_unreachable",
@@ -5392,13 +5331,13 @@ dependencies = [
[[package]]
name = "selectors"
version = "0.30.0"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3df44ba8a7ca7a4d28c589e04f526266ed76b6cc556e33fe69fa25de31939a65"
checksum = "5685b6ae43bfcf7d2e7dfcfb5d8e8f61b46442c902531e41a32a9a8bf0ee0fb6"
dependencies = [
"bitflags 2.9.1",
"cssparser 0.35.0",
"derive_more 2.0.1",
"cssparser",
"derive_more",
"fxhash",
"log",
"new_debug_unreachable",
@@ -5487,9 +5426,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.142"
version = "1.0.143"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
dependencies = [
"itoa 1.0.15",
"memchr",
@@ -5763,7 +5702,7 @@ dependencies = [
"serde_json",
"sha2 0.10.9",
"smallvec 1.15.1",
"thiserror 2.0.13",
"thiserror 2.0.15",
"time 0.3.41",
"tokio 1.47.1",
"tokio-stream",
@@ -5846,7 +5785,7 @@ dependencies = [
"smallvec 1.15.1",
"sqlx-core",
"stringprep",
"thiserror 2.0.13",
"thiserror 2.0.15",
"time 0.3.41",
"tracing",
"whoami",
@@ -5884,7 +5823,7 @@ dependencies = [
"smallvec 1.15.1",
"sqlx-core",
"stringprep",
"thiserror 2.0.13",
"thiserror 2.0.15",
"time 0.3.41",
"tracing",
"whoami",
@@ -5909,7 +5848,7 @@ dependencies = [
"serde",
"serde_urlencoded",
"sqlx-core",
"thiserror 2.0.13",
"thiserror 2.0.15",
"time 0.3.41",
"tracing",
"url",
@@ -6139,7 +6078,7 @@ dependencies = [
"tantivy-stacker",
"tantivy-tokenizer-api",
"tempfile",
"thiserror 2.0.13",
"thiserror 2.0.15",
"time 0.3.41",
"uuid",
"winapi 0.3.9",
@@ -6274,11 +6213,11 @@ dependencies = [
[[package]]
name = "thiserror"
version = "2.0.13"
version = "2.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0b43c71ffa7199f8a00fe309ac01551e3c35105b50ceacd7f67ce080ec18fdf"
checksum = "80d76d3f064b981389ecb4b6b7f45a0bf9fdac1d5b9204c7bd6714fecc302850"
dependencies = [
"thiserror-impl 2.0.13",
"thiserror-impl 2.0.15",
]
[[package]]
@@ -6294,9 +6233,9 @@ dependencies = [
[[package]]
name = "thiserror-impl"
version = "2.0.13"
version = "2.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c65da2500f2800e48970ef01d47aeb80e328e38adf723def51b5ad1d0a8ca03e"
checksum = "44d29feb33e986b6ea906bd9c3559a856983f92371b3eaa5e83782a351623de0"
dependencies = [
"proc-macro2",
"quote",
@@ -6971,7 +6910,7 @@ dependencies = [
"log",
"rand 0.9.2",
"sha1",
"thiserror 2.0.13",
"thiserror 2.0.15",
"utf-8",
]
@@ -7390,7 +7329,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.59.0",
"windows-sys 0.48.0",
]
[[package]]
@@ -7745,7 +7684,7 @@ dependencies = [
"opentelemetry",
"opentelemetry-otlp",
"opentelemetry_sdk",
"thiserror 2.0.13",
"thiserror 2.0.15",
"tokio 1.47.1",
"tracing",
"tracing-appender",

View File

@@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
edition = "2021"
license = "UNLICENSED"
publish = ["xinu"]
version = "0.17.29"
version = "0.17.34"
repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev]

View File

@@ -1,22 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\nSELECT\n url\nFROM email_photo ep\nJOIN email_address ea\nON ep.id = ea.email_photo_id\nWHERE\n address = $1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "url",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false
]
},
"hash": "126e16a4675e8d79f330b235f9e1b8614ab1e1526e4e69691c5ebc70d54a42ef"
}

View File

@@ -1,20 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT rule as \"rule: Json<Rule>\"\n FROM email_rule\n ORDER BY sort_order\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "rule: Json<Rule>",
"type_info": "Jsonb"
}
],
"parameters": {
"Left": []
},
"nullable": [
false
]
},
"hash": "6c5b0a96f45f78795732ea428cc01b4eab28b7150aa37387e7439a6b0b58e88c"
}

View File

@@ -29,8 +29,8 @@ flate2 = "1.1.2"
futures = "0.3.31"
headers = "0.4.0"
html-escape = "0.2.13"
letterbox-notmuch = { path = "../notmuch", version = "0.17.29", registry = "xinu" }
letterbox-shared = { path = "../shared", version = "0.17.29", registry = "xinu" }
letterbox-notmuch = { path = "../notmuch", version = "0.17.34", registry = "xinu" }
letterbox-shared = { path = "../shared", version = "0.17.34", registry = "xinu" }
linkify = "0.10.0"
lol_html = "2.3.0"
mailparse = "0.16.1"
@@ -39,7 +39,7 @@ memmap = "0.7.0"
quick-xml = { version = "0.38.1", features = ["serialize"] }
regex = "1.11.1"
reqwest = { version = "0.12.15", features = ["blocking"] }
scraper = "0.23.1"
scraper = "0.24.0"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
sqlx = { version = "0.8.5", features = ["postgres", "runtime-tokio", "time"] }
@@ -55,6 +55,7 @@ urlencoding = "2.1.3"
xtracing = { version = "0.3.2", registry = "xinu" }
zip = "4.3.0"
[build-dependencies]
build-info-build = "0.0.41"

View File

@@ -0,0 +1 @@
SELECT rule as "rule: Json<Rule>" FROM email_rule ORDER BY sort_order

View File

@@ -0,0 +1 @@
SELECT url FROM email_photo ep JOIN email_address ea ON ep.id = ea.email_photo_id WHERE address = $1

1256
server/src/email_extract.rs Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -41,4 +41,8 @@ pub enum ServerError {
InfaillibleError(#[from] Infallible),
#[error("askama error: {0}")]
AskamaError(#[from] askama::Error),
#[error("xml error: {0}")]
XmlError(#[from] quick_xml::Error),
#[error("xml encoding error: {0}")]
XmlEncodingError(#[from] quick_xml::encoding::EncodingError),
}

View File

@@ -237,6 +237,22 @@ impl Body {
content_tree: "".to_string(),
})
}
pub fn to_html(&self) -> Option<String> {
match self {
Body::Html(h) => Some(h.html.clone()),
Body::PlainText(p) => Some(format!("<pre>{}</pre>", html_escape::encode_text(&p.text))),
Body::UnhandledContentType(u) => Some(format!("<pre>{}</pre>", html_escape::encode_text(&u.text))),
}
}
pub fn to_html_content_tree(&self) -> Option<String> {
match self {
Body::Html(h) => Some(h.content_tree.clone()),
Body::PlainText(p) => Some(p.content_tree.clone()),
Body::UnhandledContentType(u) => Some(u.content_tree.clone()),
}
}
}
#[derive(Debug, SimpleObject)]

View File

@@ -1,4 +1,5 @@
pub mod config;
pub mod email_extract;
pub mod error;
pub mod graphql;
pub mod newsreader;

File diff suppressed because it is too large Load Diff

View File

@@ -40,6 +40,9 @@
<th style="border:1px solid #bbb;padding:4px 8px;">Source IP</th>
<th style="border:1px solid #bbb;padding:4px 8px;">Count</th>
<th style="border:1px solid #bbb;padding:4px 8px;">Header From</th>
{% if report.has_envelope_to %}
<th style="border:1px solid #bbb;padding:4px 8px;">Envelope To</th>
{% endif %}
<th style="border:1px solid #bbb;padding:4px 8px;">Disposition</th>
<th style="border:1px solid #bbb;padding:4px 8px;">DKIM</th>
<th style="border:1px solid #bbb;padding:4px 8px;">SPF</th>
@@ -52,6 +55,9 @@
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.source_ip }}</td>
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.count }}</td>
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.header_from }}</td>
{% if report.has_envelope_to %}
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.envelope_to }}</td>
{% endif %}
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.disposition }}</td>
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.dkim }}</td>
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.spf }}</td>
@@ -74,6 +80,10 @@
</span><br>
{% endfor %}
{% for reason in rec.reason %}
<span style="white-space:nowrap;">Reason: {{ reason }}</span><br>
{% endfor %}
{% endif %}
</td>
</tr>

View File

@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>TLS Report</title>
</head>
<body>
<h3>TLS Report Summary:</h3>
<p>Organization: {{ report.organization_name }}</p>
<p>Date Range: {{ report.date_range.start_datetime }} to {{ report.date_range.end_datetime }}</p>
<p>Contact: {{ report.contact_info }}</p>
<p>Report ID: {{ report.report_id }}</p>
<h4>Policies:</h4>
{% for policy in report.policies %}
<h5>Policy Domain: {{ policy.policy.policy_domain }}</h5>
<ul>
<li>Policy Type: {{ policy.policy.policy_type }}</li>
<li>Policy String: {{ policy.policy.policy_string | join(", ") }}</li>
<li>Successful Sessions: {{ policy.summary.total_successful_session_count }}</li>
<li>Failed Sessions: {{ policy.summary.total_failure_session_count }}</li>
</ul>
<ul>
{% for mx_host in policy.policy.mx_host %}
<li>Hostname: {{ mx_host.hostname }}, Failures: {{ mx_host.failure_count }}, Result: {{ mx_host.result_type }}</li>
{% endfor %}
</ul>
<ul>
{% for detail in policy.failure_details %}
<li>Result: {{ detail.result_type }}, Sending IP: {{ detail.sending_mta_ip }}, Failed Sessions: {{ detail.failed_session_count }}
{% if detail.failure_reason_code != "" %}
(Reason: {{ detail.failure_reason_code }})
{% endif %}
</li>
(Receiving IP: {{ detail.receiving_ip }})
(Receiving MX: {{ detail.receiving_mx_hostname }})
(Additional Info: {{ detail.additional_info }})
{% endfor %}
</ul>
{% endfor %}
</body>
</html>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<feedback>
<version>1.0</version>
<report_metadata>
<org_name>google.com</org_name>
<email>noreply-dmarc-support@google.com</email>
<extra_contact_info>https://support.google.com/a/answer/2466580</extra_contact_info>
<report_id>5142106658860834914</report_id>
<date_range>
<begin>1755302400</begin>
<end>1755388799</end>
</date_range>
</report_metadata>
<policy_published>
<domain>xinu.tv</domain>
<adkim>s</adkim>
<aspf>s</aspf>
<p>quarantine</p>
<sp>reject</sp>
<pct>100</pct>
<np>reject</np>
</policy_published>
<record>
<row>
<source_ip>74.207.253.222</source_ip>
<count>1</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
<identifiers>
<header_from>xinu.tv</header_from>
</identifiers>
<auth_results>
<dkim>
<domain>xinu.tv</domain>
<result>pass</result>
<selector>mail</selector>
</dkim>
<spf>
<domain>xinu.tv</domain>
<result>pass</result>
</spf>
</auth_results>
</record>
</feedback>

78
server/testdata/dmarc-example.xml vendored Normal file
View File

@@ -0,0 +1,78 @@
<?xml version="1.0"?>
<feedback xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<version>1.0</version>
<report_metadata>
<org_name>Outlook.com</org_name>
<email>dmarcreport@microsoft.com</email>
<report_id>e6c5a2ce6e074d7d8cd041a0d6f32a3d</report_id>
<date_range>
<begin>1755302400</begin>
<end>1755388800</end>
</date_range>
</report_metadata>
<policy_published>
<domain>xinu.tv</domain>
<adkim>s</adkim>
<aspf>s</aspf>
<p>quarantine</p>
<sp>reject</sp>
<pct>100</pct>
<fo>1</fo>
</policy_published>
<record>
<row>
<source_ip>74.207.253.222</source_ip>
<count>1</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
<identifiers>
<envelope_to>msn.com</envelope_to>
<envelope_from>xinu.tv</envelope_from>
<header_from>xinu.tv</header_from>
</identifiers>
<auth_results>
<dkim>
<domain>xinu.tv</domain>
<selector>mail</selector>
<result>pass</result>
</dkim>
<spf>
<domain>xinu.tv</domain>
<scope>mfrom</scope>
<result>pass</result>
</spf>
</auth_results>
</record>
<record>
<row>
<source_ip>74.207.253.222</source_ip>
<count>1</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
<identifiers>
<envelope_to>hotmail.com</envelope_to>
<envelope_from>xinu.tv</envelope_from>
<header_from>xinu.tv</header_from>
</identifiers>
<auth_results>
<dkim>
<domain>xinu.tv</domain>
<selector>mail</selector>
<result>pass</result>
</dkim>
<spf>
<domain>xinu.tv</domain>
<scope>mfrom</scope>
<result>pass</result>
</spf>
</auth_results>
</record>
</feedback>

View File

@@ -12,7 +12,7 @@ version.workspace = true
[dependencies]
build-info = "0.0.41"
letterbox-notmuch = { path = "../notmuch", version = "0.17.29", registry = "xinu" }
letterbox-notmuch = { path = "../notmuch", version = "0.17.34", registry = "xinu" }
regex = "1.11.1"
serde = { version = "1.0.219", features = ["derive"] }
sqlx = "0.8.5"

View File

@@ -33,7 +33,7 @@ wasm-bindgen = "=0.2.100"
uuid = { version = "1.16.0", features = [
"js",
] } # direct dep to set js feature, prevents Rng issues
letterbox-shared = { path = "../shared/", version = "0.17.29", registry = "xinu" }
letterbox-shared = { path = "../shared/", version = "0.17.34", registry = "xinu" }
seed_hooks = { version = "0.4.1", registry = "xinu" }
strum_macros = "0.27.1"
gloo-console = "0.3.0"