@bobfrankston/rmfmail 1.2.287 → 1.2.288

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 CHANGED
@@ -1,33 +1,29 @@
1
- Grammar squiggles: stop inventing words, stop underlining white space
1
+ Trust: a message that never crossed a trust boundary proves itself
2
2
 
3
- Three complaints from one compose session (Bob 2026-08-27, forwarding a
4
- message), all of them the checker arguing with prose that was fine:
3
+ Bob 2026-08-27, on his own reply to John Levine about spam handling: "why is
4
+ my own mail spam". It carried no Authentication-Results at all his own
5
+ authenticated submission never left his systems, so nothing added one — and
6
+ `proved` therefore came back false, dropping it to a caution banner that told
7
+ him not to open the links in prose he had just written. What flagged it was
8
+ `URIBL_DBL_SPAM` 8.0 on blueorchestra.org: the domain he was QUOTING, in a
9
+ discussion about spam. Guilt by association at its purest.
5
10
 
6
- 1. "keypoint". Harper's CompoundNouns rule fires on any noun+noun pair whose
7
- joined form is in its dictionary, so "One key point in my recent efforts"
8
- came back as an error suggesting a word he did not write. Disabled in the
9
- daemon next to AvoidCurses — same objection as that one: the tool
10
- proofreads, it does not get a vote on word choice. Its siblings (MergeWords,
11
- MakeupCompoundNoun, OvertimeCompoundNoun, ThereAfterCompound,
12
- EasyGoingCompoundAdjective) are named in a comment there, one line each to
13
- turn off if they start nagging.
11
+ SpamAssassin states two proofs in its own rule list that such mail carries
12
+ instead of an AR header:
14
13
 
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.
14
+ ALL_TRUSTED Passed through trusted hosts only via SMTP
15
+ DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain
26
16
 
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.
17
+ DKIM_VALID_AU is the same evidence DMARC alignment rests on the author
18
+ domain signed it and the signature verified so it proves the From line on
19
+ its own. ALL_TRUSTED says nothing untrusted handled the message in transit.
20
+ `proved` now comes from any of the three, and `provedBy` names which, so the
21
+ banner says WHICH proof rather than asserting DMARC that isn't there. His
22
+ message is now a grey note: "…but bob.ma proved it sent this. Valid signature
23
+ from bob.ma, the sending domain itself (DKIM_VALID_AU)."
29
24
 
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.
25
+ Forgery still outranks proof across the store the danger count is unchanged
26
+ at 294 of 1,131 flagged; caution 599, quiet 238.
27
+
28
+ Also: the Insert menu gains Blockquote and Quoted text (paste) — rmf-tiny
29
+ 0.1.53, see its .commitmsg.
@@ -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: dmarc.pass,
2323
- provedDomain: dmarc.domain,
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: `DMARC pass, aligned${a.provedPolicy ? `, policy ${a.provedPolicy}` : ""}. ${numbers}${why}${bayes}`
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.provedDomain} passed DMARC, so the From line is genuine. ` : "";
2374
+ const proof = a.proved ? `${provedNote(a)} ` : "";
2359
2375
  return {
2360
2376
  id: "server-spam-verdict",
2361
2377
  severity: "caution",