Compare commits
6 Commits
letterbox-
...
letterbox-
| Author | SHA1 | Date | |
|---|---|---|---|
| ab1862db2d | |||
| 0afa6da3f2 | |||
| f85649dadd | |||
| 0140fa5efe | |||
| 832b322b77 | |||
| 66dbcf2cfd |
63
Cargo.lock
generated
63
Cargo.lock
generated
@@ -2432,7 +2432,7 @@ dependencies = [
|
||||
"base64 0.21.7",
|
||||
"byteorder",
|
||||
"flate2",
|
||||
"nom 7.1.3",
|
||||
"nom",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
@@ -2914,19 +2914,6 @@ dependencies = [
|
||||
"thiserror 1.0.69",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icalendar"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e69a1b52143a7fc94b55d008e8ab30506ebc93774ddb2752ee44266378fc5d6"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"iso8601",
|
||||
"nom 8.0.0",
|
||||
"nom-language",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_collections"
|
||||
version = "2.0.0"
|
||||
@@ -3166,15 +3153,6 @@ version = "1.70.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||
|
||||
[[package]]
|
||||
name = "iso8601"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1082f0c48f143442a1ac6122f67e360ceee130b967af4d50996e5154a45df46"
|
||||
dependencies = [
|
||||
"nom 8.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.14.0"
|
||||
@@ -3251,7 +3229,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "letterbox-notmuch"
|
||||
version = "0.17.36"
|
||||
version = "0.17.38"
|
||||
dependencies = [
|
||||
"itertools",
|
||||
"log",
|
||||
@@ -3266,7 +3244,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "letterbox-procmail2notmuch"
|
||||
version = "0.17.36"
|
||||
version = "0.17.38"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@@ -3279,7 +3257,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "letterbox-server"
|
||||
version = "0.17.36"
|
||||
version = "0.17.38"
|
||||
dependencies = [
|
||||
"ammonia",
|
||||
"anyhow",
|
||||
@@ -3302,9 +3280,8 @@ dependencies = [
|
||||
"html-escape",
|
||||
"html2text",
|
||||
"ical",
|
||||
"icalendar",
|
||||
"letterbox-notmuch 0.17.36",
|
||||
"letterbox-shared 0.17.36",
|
||||
"letterbox-notmuch 0.17.38",
|
||||
"letterbox-shared 0.17.38",
|
||||
"linkify",
|
||||
"lol_html",
|
||||
"mailparse",
|
||||
@@ -3345,10 +3322,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "letterbox-shared"
|
||||
version = "0.17.36"
|
||||
version = "0.17.38"
|
||||
dependencies = [
|
||||
"build-info",
|
||||
"letterbox-notmuch 0.17.36",
|
||||
"letterbox-notmuch 0.17.38",
|
||||
"regex",
|
||||
"serde",
|
||||
"sqlx",
|
||||
@@ -3358,7 +3335,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "letterbox-web"
|
||||
version = "0.17.36"
|
||||
version = "0.17.38"
|
||||
dependencies = [
|
||||
"build-info",
|
||||
"build-info-build",
|
||||
@@ -3370,7 +3347,7 @@ dependencies = [
|
||||
"graphql_client",
|
||||
"human_format",
|
||||
"itertools",
|
||||
"letterbox-shared 0.17.36",
|
||||
"letterbox-shared 0.17.38",
|
||||
"log",
|
||||
"seed",
|
||||
"seed_hooks",
|
||||
@@ -3957,24 +3934,6 @@ dependencies = [
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "8.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom-language"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2de2bc5b451bfedaef92c90b8939a8fff5770bdcc1fafd6239d086aab8fa6b29"
|
||||
dependencies = [
|
||||
"nom 8.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.46.0"
|
||||
@@ -6369,7 +6328,7 @@ version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e810cdeeebca57fc3f7bfec5f85fdbea9031b2ac9b990eb5ff49b371d52bbe6a"
|
||||
dependencies = [
|
||||
"nom 7.1.3",
|
||||
"nom",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
@@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
|
||||
edition = "2021"
|
||||
license = "UNLICENSED"
|
||||
publish = ["xinu"]
|
||||
version = "0.17.36"
|
||||
version = "0.17.38"
|
||||
repository = "https://git.z.xinu.tv/wathiede/letterbox"
|
||||
|
||||
[profile.dev]
|
||||
|
||||
@@ -31,10 +31,9 @@ flate2 = "1.1.2"
|
||||
futures = "0.3.31"
|
||||
headers = "0.4.0"
|
||||
html-escape = "0.2.13"
|
||||
icalendar = "0.17.1"
|
||||
ical = "0.10"
|
||||
letterbox-notmuch = { path = "../notmuch", version = "0.17.36", registry = "xinu" }
|
||||
letterbox-shared = { path = "../shared", version = "0.17.36", registry = "xinu" }
|
||||
letterbox-notmuch = { path = "../notmuch", version = "0.17.38", registry = "xinu" }
|
||||
letterbox-shared = { path = "../shared", version = "0.17.38", registry = "xinu" }
|
||||
linkify = "0.10.0"
|
||||
lol_html = "2.3.0"
|
||||
mailparse = "0.16.1"
|
||||
|
||||
@@ -1838,7 +1838,6 @@ pub fn render_ical_summary(ical_data: &str) -> Result<String, ServerError> {
|
||||
Ok(summary_parts.join("<hr>"))
|
||||
}
|
||||
|
||||
|
||||
fn parse_ical_datetime_tz(dt: &str, tz: Tz) -> Option<chrono::DateTime<Tz>> {
|
||||
let dt = dt.split(':').last().unwrap_or(dt);
|
||||
if let Ok(ndt) = chrono::NaiveDateTime::parse_from_str(dt, "%Y%m%dT%H%M%SZ") {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>TLS Report</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>TLS Report Summary:</h3>
|
||||
<p>Organization: {{ report.organization_name }}</p>
|
||||
@@ -10,34 +12,37 @@
|
||||
<p>Contact: {{ report.contact_info }}</p>
|
||||
<p>Report ID: {{ report.report_id }}</p>
|
||||
|
||||
<h4>Policies:</h4>
|
||||
<h4><b>Policies:</b></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>
|
||||
<h5><b>Policy Domain:</b> {{ policy.policy.policy_domain }}</h5>
|
||||
<ul>
|
||||
<li><b>Policy Type:</b> {{ policy.policy.policy_type }}</li>
|
||||
<li><b>Policy String:</b> {{ policy.policy.policy_string | join(", ") }}</li>
|
||||
<li><b>Successful Sessions:</b> {{ policy.summary.total_successful_session_count }}</li>
|
||||
<li><b>Failed Sessions:</b> {{ 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 mx_host in policy.policy.mx_host %}
|
||||
<li><b>Hostname:</b> {{ mx_host.hostname }}, <b>Failures:</b> {{ mx_host.failure_count }}, <b>Result:</b> {{
|
||||
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>
|
||||
<ul>
|
||||
{% for detail in policy.failure_details %}
|
||||
<li><b>Result:</b> {{ detail.result_type }}, <b>Sending IP:</b> {{ detail.sending_mta_ip }}, <b>Failed
|
||||
Sessions:</b> {{ detail.failed_session_count }}
|
||||
{% if detail.failure_reason_code != "" %}
|
||||
(<b>Reason:</b> {{ detail.failure_reason_code }})
|
||||
{% endif %}
|
||||
</li>
|
||||
(<b>Receiving IP:</b> {{ detail.receiving_ip }})
|
||||
(<b>Receiving MX:</b> {{ detail.receiving_mx_hostname }})
|
||||
(<b>Additional Info:</b> {{ detail.additional_info }})
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -12,7 +12,7 @@ version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
build-info = "0.0.41"
|
||||
letterbox-notmuch = { path = "../notmuch", version = "0.17.36", registry = "xinu" }
|
||||
letterbox-notmuch = { path = "../notmuch", version = "0.17.38", registry = "xinu" }
|
||||
regex = "1.11.1"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
sqlx = "0.8.5"
|
||||
|
||||
@@ -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.36", registry = "xinu" }
|
||||
letterbox-shared = { path = "../shared/", version = "0.17.38", registry = "xinu" }
|
||||
seed_hooks = { version = "0.4.1", registry = "xinu" }
|
||||
strum_macros = "0.27.1"
|
||||
gloo-console = "0.3.0"
|
||||
|
||||
@@ -901,13 +901,22 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
.collect();
|
||||
let show_x_original_to = !*to_xinu.borrow() && msg.x_original_to.is_some();
|
||||
let show_delivered_to = !*to_xinu.borrow() && !show_x_original_to && msg.delivered_to.is_some();
|
||||
let common_style = C!["text-sm", "pr-2", "text-gray-500"];
|
||||
div![
|
||||
C!["flex", "p-4", "bg-neutral-800"],
|
||||
div![avatar],
|
||||
C!["flex", "bg-neutral-800"],
|
||||
div![C!["self-center"], avatar],
|
||||
div![
|
||||
C!["px-4", "mr-auto"],
|
||||
span![
|
||||
C!["font-semibold", "text-sm"],
|
||||
C![
|
||||
"mx-2",
|
||||
"flex-1",
|
||||
"flex",
|
||||
"flex-nowrap",
|
||||
"items-center",
|
||||
"truncate",
|
||||
],
|
||||
div![
|
||||
C!["font-semibold", "text-white"],
|
||||
&common_style,
|
||||
from_detail.as_ref().map(|addr| attrs! {
|
||||
At::Title => addr
|
||||
}),
|
||||
@@ -915,7 +924,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
],
|
||||
" ",
|
||||
IF!(!msg.to.is_empty() => div![
|
||||
C!["text-xs"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"To: "
|
||||
@@ -926,7 +935,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
" "
|
||||
]),
|
||||
IF!(!msg.cc.is_empty() => div![
|
||||
C!["text-xs", "max-w-full", "overflow-clip", "text-ellipsis"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"CC: "
|
||||
@@ -934,7 +943,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
cc_addrs
|
||||
]),
|
||||
IF!(show_x_original_to => div![
|
||||
C!["text-xs"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"Original To: "
|
||||
@@ -953,7 +962,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
]
|
||||
]),
|
||||
IF!(show_delivered_to => div![
|
||||
C!["text-xs"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"Delivered To: "
|
||||
@@ -972,27 +981,25 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
]
|
||||
]),
|
||||
],
|
||||
span![
|
||||
C!["text-right"],
|
||||
msg.timestamp
|
||||
.map(|ts| div![C!["text-xs", "text-nowrap"], human_age(ts)]),
|
||||
div![
|
||||
C!["p-2"],
|
||||
i![C![
|
||||
"mx-4",
|
||||
"read-status",
|
||||
"far",
|
||||
if is_unread {
|
||||
"fa-envelope"
|
||||
} else {
|
||||
"fa-envelope-open"
|
||||
},
|
||||
]],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::SetUnread(id, !is_unread)
|
||||
})
|
||||
],
|
||||
msg.timestamp.map(|ts| div![
|
||||
C!["text-xs", "text-nowrap", "justify-self-end", "self-center"],
|
||||
human_age(ts)
|
||||
]),
|
||||
div![
|
||||
i![C![
|
||||
"m-2",
|
||||
"read-status",
|
||||
"far",
|
||||
if is_unread {
|
||||
"fa-envelope"
|
||||
} else {
|
||||
"fa-envelope-open"
|
||||
},
|
||||
]],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::SetUnread(id, !is_unread)
|
||||
})
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1007,7 +1014,7 @@ fn message_render(msg: &ShowThreadQueryThreadOnEmailThreadMessages, open: bool)
|
||||
};
|
||||
let from = from.map(|f| f.replace('.', "-").replace('@', "-"));
|
||||
div![
|
||||
C!["lg:mb-4"],
|
||||
C!["pb-1"],
|
||||
div![
|
||||
if open {
|
||||
render_open_header(&msg)
|
||||
|
||||
Reference in New Issue
Block a user