Compare commits
10 Commits
01164d6afa
...
b9b12dd717
| Author | SHA1 | Date | |
|---|---|---|---|
| b9b12dd717 | |||
| 633e055472 | |||
| 951ee70279 | |||
| 3a41ab1767 | |||
| 5c9955a89e | |||
| 1f75627fd2 | |||
| 5c42d04598 | |||
| 4d888fbea3 | |||
| 8f53678e53 | |||
| 8218fca2ef |
22
Cargo.lock
generated
22
Cargo.lock
generated
@ -1751,7 +1751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
|
checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.60.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3171,7 +3171,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "letterbox-notmuch"
|
name = "letterbox-notmuch"
|
||||||
version = "0.17.29"
|
version = "0.17.30"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools",
|
"itertools",
|
||||||
"log",
|
"log",
|
||||||
@ -3186,7 +3186,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "letterbox-procmail2notmuch"
|
name = "letterbox-procmail2notmuch"
|
||||||
version = "0.17.29"
|
version = "0.17.30"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@ -3199,7 +3199,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "letterbox-server"
|
name = "letterbox-server"
|
||||||
version = "0.17.29"
|
version = "0.17.30"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ammonia",
|
"ammonia",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@ -3219,8 +3219,8 @@ dependencies = [
|
|||||||
"futures 0.3.31",
|
"futures 0.3.31",
|
||||||
"headers",
|
"headers",
|
||||||
"html-escape",
|
"html-escape",
|
||||||
"letterbox-notmuch 0.17.29",
|
"letterbox-notmuch 0.17.30",
|
||||||
"letterbox-shared 0.17.29",
|
"letterbox-shared 0.17.30",
|
||||||
"linkify",
|
"linkify",
|
||||||
"lol_html",
|
"lol_html",
|
||||||
"mailparse",
|
"mailparse",
|
||||||
@ -3261,10 +3261,10 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "letterbox-shared"
|
name = "letterbox-shared"
|
||||||
version = "0.17.29"
|
version = "0.17.30"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build-info",
|
"build-info",
|
||||||
"letterbox-notmuch 0.17.29",
|
"letterbox-notmuch 0.17.30",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
@ -3274,7 +3274,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "letterbox-web"
|
name = "letterbox-web"
|
||||||
version = "0.17.29"
|
version = "0.17.30"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build-info",
|
"build-info",
|
||||||
"build-info-build",
|
"build-info-build",
|
||||||
@ -3286,7 +3286,7 @@ dependencies = [
|
|||||||
"graphql_client",
|
"graphql_client",
|
||||||
"human_format",
|
"human_format",
|
||||||
"itertools",
|
"itertools",
|
||||||
"letterbox-shared 0.17.29",
|
"letterbox-shared 0.17.30",
|
||||||
"log",
|
"log",
|
||||||
"seed",
|
"seed",
|
||||||
"seed_hooks",
|
"seed_hooks",
|
||||||
@ -5178,7 +5178,7 @@ dependencies = [
|
|||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys 0.9.4",
|
"linux-raw-sys 0.9.4",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.60.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "UNLICENSED"
|
license = "UNLICENSED"
|
||||||
publish = ["xinu"]
|
publish = ["xinu"]
|
||||||
version = "0.17.29"
|
version = "0.17.30"
|
||||||
repository = "https://git.z.xinu.tv/wathiede/letterbox"
|
repository = "https://git.z.xinu.tv/wathiede/letterbox"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
|||||||
@ -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"
|
|
||||||
}
|
|
||||||
@ -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"
|
|
||||||
}
|
|
||||||
@ -29,8 +29,8 @@ flate2 = "1.1.2"
|
|||||||
futures = "0.3.31"
|
futures = "0.3.31"
|
||||||
headers = "0.4.0"
|
headers = "0.4.0"
|
||||||
html-escape = "0.2.13"
|
html-escape = "0.2.13"
|
||||||
letterbox-notmuch = { path = "../notmuch", version = "0.17.29", registry = "xinu" }
|
letterbox-notmuch = { path = "../notmuch", version = "0.17.30", registry = "xinu" }
|
||||||
letterbox-shared = { path = "../shared", version = "0.17.29", registry = "xinu" }
|
letterbox-shared = { path = "../shared", version = "0.17.30", registry = "xinu" }
|
||||||
linkify = "0.10.0"
|
linkify = "0.10.0"
|
||||||
lol_html = "2.3.0"
|
lol_html = "2.3.0"
|
||||||
mailparse = "0.16.1"
|
mailparse = "0.16.1"
|
||||||
@ -55,6 +55,7 @@ urlencoding = "2.1.3"
|
|||||||
xtracing = { version = "0.3.2", registry = "xinu" }
|
xtracing = { version = "0.3.2", registry = "xinu" }
|
||||||
zip = "4.3.0"
|
zip = "4.3.0"
|
||||||
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
build-info-build = "0.0.41"
|
build-info-build = "0.0.41"
|
||||||
|
|
||||||
|
|||||||
1
server/sql/label_unprocessed.sql
Normal file
1
server/sql/label_unprocessed.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
SELECT rule as "rule: Json<Rule>" FROM email_rule ORDER BY sort_order
|
||||||
1
server/sql/photo_url_for_email_address.sql
Normal file
1
server/sql/photo_url_for_email_address.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
SELECT url FROM email_photo ep JOIN email_address ea ON ep.id = ea.email_photo_id WHERE address = $1
|
||||||
@ -41,4 +41,8 @@ pub enum ServerError {
|
|||||||
InfaillibleError(#[from] Infallible),
|
InfaillibleError(#[from] Infallible),
|
||||||
#[error("askama error: {0}")]
|
#[error("askama error: {0}")]
|
||||||
AskamaError(#[from] askama::Error),
|
AskamaError(#[from] askama::Error),
|
||||||
|
#[error("xml error: {0}")]
|
||||||
|
XmlError(#[from] quick_xml::Error),
|
||||||
|
#[error("xml encoding error: {0}")]
|
||||||
|
XmlEncodingError(#[from] quick_xml::encoding::EncodingError),
|
||||||
}
|
}
|
||||||
|
|||||||
@ -237,6 +237,22 @@ impl Body {
|
|||||||
content_tree: "".to_string(),
|
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)]
|
#[derive(Debug, SimpleObject)]
|
||||||
|
|||||||
794
server/src/nm.rs
794
server/src/nm.rs
File diff suppressed because it is too large
Load Diff
@ -74,6 +74,10 @@
|
|||||||
</span><br>
|
</span><br>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for reason in rec.reason %}
|
||||||
|
<span style="white-space:nowrap;">Reason: {{ reason }}</span><br>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
43
server/templates/tls_report.html
Normal file
43
server/templates/tls_report.html
Normal 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>
|
||||||
@ -12,7 +12,7 @@ version.workspace = true
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
build-info = "0.0.41"
|
build-info = "0.0.41"
|
||||||
letterbox-notmuch = { path = "../notmuch", version = "0.17.29", registry = "xinu" }
|
letterbox-notmuch = { path = "../notmuch", version = "0.17.30", registry = "xinu" }
|
||||||
regex = "1.11.1"
|
regex = "1.11.1"
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
sqlx = "0.8.5"
|
sqlx = "0.8.5"
|
||||||
|
|||||||
@ -33,7 +33,7 @@ wasm-bindgen = "=0.2.100"
|
|||||||
uuid = { version = "1.16.0", features = [
|
uuid = { version = "1.16.0", features = [
|
||||||
"js",
|
"js",
|
||||||
] } # direct dep to set js feature, prevents Rng issues
|
] } # 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.30", registry = "xinu" }
|
||||||
seed_hooks = { version = "0.4.1", registry = "xinu" }
|
seed_hooks = { version = "0.4.1", registry = "xinu" }
|
||||||
strum_macros = "0.27.1"
|
strum_macros = "0.27.1"
|
||||||
gloo-console = "0.3.0"
|
gloo-console = "0.3.0"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user