@bobfrankston/rmfmail 1.2.287 → 1.2.289
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.commitmsg +12 -33
- package/client/android-bootstrap.bundle.js +22 -5
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js +2 -1
- package/client/app.bundle.js.map +2 -2
- package/client/components/message-viewer.js +9 -1
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +10 -2
- package/client/compose/compose.bundle.js +63 -1
- package/client/compose/compose.bundle.js.map +3 -3
- package/client/lib/rmf-tiny.js +85 -0
- package/npmchanges.md +68 -0
- package/package.json +7 -7
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-settings/package.json +1 -1
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-types/package.json +1 -1
- package/packages/mailx-types/trust.d.ts +7 -1
- package/packages/mailx-types/trust.d.ts.map +1 -1
- package/packages/mailx-types/trust.js +44 -4
- package/packages/mailx-types/trust.js.map +1 -1
- package/packages/mailx-types/trust.ts +58 -6
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-38644 → node_modules.npmglobalize-stash-53712}/.package-lock.json +0 -0
package/.commitmsg
CHANGED
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
message
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
turn off if they start nagging.
|
|
14
|
-
|
|
15
|
-
2. A blue dotted line across two blank lines. blockText concatenated a block's
|
|
16
|
-
text nodes with no separator, so the last word of a paragraph was glued to
|
|
17
|
-
the first word of the next: "…of the network" + "To: x@y.com" reached Harper
|
|
18
|
-
as "networkTo", and it reported — correctly, for the string it was given —
|
|
19
|
-
that the word should be split. The span then covered a junction that on
|
|
20
|
-
screen is two empty lines, and getClientRects painted a full-width underline
|
|
21
|
-
over the whitespace. Verified both halves against the real engine: gluing
|
|
22
|
-
produces `networkTo` and `FrankstonSubject` lints that vanish once the
|
|
23
|
-
breaks are there. blockText now emits "\n" at every line-breaking element,
|
|
24
|
-
and spanToRange refuses any span whose ends sit in different line boxes, so
|
|
25
|
-
no squiggle can ever be drawn across a paragraph boundary again.
|
|
26
|
-
|
|
27
|
-
3. Lints on the sentence being typed. The unfinished sentence under the caret
|
|
28
|
-
is now exempt — a thought that is not out yet is not an error.
|
|
29
|
-
|
|
30
|
-
The pure helpers (collectBlocks, blockText, lineBox, caretOffset,
|
|
31
|
-
sentenceStart, spanToRange) moved to module scope and are exported, because
|
|
32
|
-
they hold the decisions worth testing; tests/dom/harper-lint.test.ts covers all
|
|
33
|
-
three rules in jsdom, using the forward markup client/app.ts actually builds.
|
|
1
|
+
The spam chip has to name the proof it actually has
|
|
2
|
+
|
|
3
|
+
Follow-up to v1.2.288, caught by looking at the rendered chip on Bob's own
|
|
4
|
+
message: the banner correctly said "Valid signature from bob.ma (DKIM_VALID_AU)"
|
|
5
|
+
while the chip's tooltip underneath asserted "the sending domain passed DMARC"
|
|
6
|
+
— on a message that carries no Authentication-Results header at all. A claim
|
|
7
|
+
the reader cannot check is exactly what this whole change set exists to remove.
|
|
8
|
+
|
|
9
|
+
`SpamScore` now carries `provedBy` alongside `proved`, and the chip's tooltip
|
|
10
|
+
says which of the three proofs applied: the server's DMARC verdict, a valid
|
|
11
|
+
signature from the sending domain, or never having passed through an untrusted
|
|
12
|
+
host.
|
|
@@ -2309,6 +2309,9 @@ function analyzeServerSpam(input) {
|
|
|
2309
2309
|
const scored = (r) => !(r.score <= 0);
|
|
2310
2310
|
const present = (cls) => rules.some((r) => r.cls === cls && scored(r));
|
|
2311
2311
|
const kind = dmarc.authFailures.length || present("forgery") ? "forgery" : present("association") ? "association" : present("other") ? "unclassified" : rules.length ? "bulk" : "unclassified";
|
|
2312
|
+
const has = (name) => rules.some((r) => r.name === name);
|
|
2313
|
+
const provedBy = dmarc.pass ? "dmarc" : has("DKIM_VALID_AU") ? "dkim" : has("ALL_TRUSTED") ? "trusted" : "";
|
|
2314
|
+
const fromDomain = (bare(input.fromAddress).split("@")[1] || "").toLowerCase();
|
|
2312
2315
|
const reasons = rules.filter((r) => r.cls !== "neutral" && scored(r)).sort((a, b) => (b.score || 0) - (a.score || 0)).slice(0, 3).map((r) => {
|
|
2313
2316
|
const num = Number.isFinite(r.score) ? `${r.score.toFixed(1)} ` : "";
|
|
2314
2317
|
return r.description ? `${num}${r.name} (${r.description})` : `${num}${r.name}`;
|
|
@@ -2319,14 +2322,27 @@ function analyzeServerSpam(input) {
|
|
|
2319
2322
|
flagged,
|
|
2320
2323
|
rules,
|
|
2321
2324
|
kind,
|
|
2322
|
-
proved:
|
|
2323
|
-
|
|
2325
|
+
proved: !!provedBy,
|
|
2326
|
+
provedBy,
|
|
2327
|
+
provedDomain: dmarc.domain || fromDomain,
|
|
2324
2328
|
provedPolicy: dmarc.policy,
|
|
2325
2329
|
bayesHam: rules.some((r) => r.name === "BAYES_00" || r.name === "BAYES_01"),
|
|
2326
2330
|
authFailures: dmarc.authFailures,
|
|
2327
2331
|
reasons
|
|
2328
2332
|
};
|
|
2329
2333
|
}
|
|
2334
|
+
function provedNote(a) {
|
|
2335
|
+
switch (a.provedBy) {
|
|
2336
|
+
case "dmarc":
|
|
2337
|
+
return `DMARC pass, aligned${a.provedPolicy ? `, policy ${a.provedPolicy}` : ""}.`;
|
|
2338
|
+
case "dkim":
|
|
2339
|
+
return `Valid signature from ${a.provedDomain}, the sending domain itself (DKIM_VALID_AU).`;
|
|
2340
|
+
case "trusted":
|
|
2341
|
+
return "It passed through trusted hosts only (ALL_TRUSTED) \u2014 nothing untrusted handled it.";
|
|
2342
|
+
default:
|
|
2343
|
+
return "";
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2330
2346
|
function serverSpamVerdict(input) {
|
|
2331
2347
|
const a = analyzeServerSpam(input);
|
|
2332
2348
|
if (!a || !a.flagged)
|
|
@@ -2345,8 +2361,8 @@ function serverSpamVerdict(input) {
|
|
|
2345
2361
|
return {
|
|
2346
2362
|
id: "server-spam-verdict",
|
|
2347
2363
|
severity: "info",
|
|
2348
|
-
text: `Your mail server scored this as spam, but ${a.provedDomain} proved it sent this.`,
|
|
2349
|
-
detail:
|
|
2364
|
+
text: a.provedBy === "trusted" ? "Your mail server scored this as spam, but it reached you without leaving your own systems." : `Your mail server scored this as spam, but ${a.provedDomain} proved it sent this.`,
|
|
2365
|
+
detail: `${provedNote(a)} ${numbers}${why}${bayes}`
|
|
2350
2366
|
};
|
|
2351
2367
|
if (a.kind === "bulk")
|
|
2352
2368
|
return {
|
|
@@ -2355,7 +2371,7 @@ function serverSpamVerdict(input) {
|
|
|
2355
2371
|
text: "Your mail server rates this bulk mail \u2014 nothing that scored tests who sent it.",
|
|
2356
2372
|
detail: `${numbers}${why}${bayes}`
|
|
2357
2373
|
};
|
|
2358
|
-
const proof = a.proved ? `${a
|
|
2374
|
+
const proof = a.proved ? `${provedNote(a)} ` : "";
|
|
2359
2375
|
return {
|
|
2360
2376
|
id: "server-spam-verdict",
|
|
2361
2377
|
severity: "caution",
|
|
@@ -2514,6 +2530,7 @@ function spamScoreOf(input) {
|
|
|
2514
2530
|
flagged: a.flagged,
|
|
2515
2531
|
kind: a.kind,
|
|
2516
2532
|
proved: a.proved,
|
|
2533
|
+
provedBy: a.provedBy,
|
|
2517
2534
|
reasons: a.reasons
|
|
2518
2535
|
};
|
|
2519
2536
|
}
|