@bobfrankston/mailx-types 0.1.84 → 0.1.86

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/trust.js +13 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-types",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/trust.js CHANGED
@@ -432,6 +432,13 @@ function serverSpamVerdict(input) {
432
432
  const senderDomain = (bare(header(input.headerLines, "sender")).split("@")[1] || "").toLowerCase();
433
433
  const relay = senderDomain ? a.signers.find(s => sameOrg(s, senderDomain)) : "";
434
434
  const via = relay && !a.proved ? { via: relay } : {};
435
+ // Say WHICH party and HOW, in the finding itself (Bob 2026-09-08: "the
436
+ // banner should tell which and how"). The action's label is quoted so
437
+ // the reader can match it to the button — and to the allowlist.jsonc
438
+ // entry it writes, `trustedIntermediaries`.
439
+ const relayNote = relay && !a.proved
440
+ ? `. Sent on the author's behalf by ${relay}, which signed it; "Trust ${relay} as an intermediary" stops this note for mail ${relay} signs.`
441
+ : "";
435
442
  const numbers = Number.isFinite(a.score) && Number.isFinite(a.threshold)
436
443
  ? `SpamAssassin score ${a.score} of ${a.threshold}`
437
444
  : "flagged by SpamAssassin";
@@ -482,7 +489,7 @@ function serverSpamVerdict(input) {
482
489
  id: "server-spam-verdict",
483
490
  severity: "caution",
484
491
  text: "Your mail server classified this as spam before delivering it.",
485
- detail: `${proof}${numbers}${why}${bayes}`,
492
+ detail: `${proof}${numbers}${why}${bayes}${relayNote}`,
486
493
  ...via,
487
494
  };
488
495
  }
@@ -680,11 +687,15 @@ function redirectorLink(input) {
680
687
  // only then: a redirector nobody signed for has no party to vouch
681
688
  // for, and a list entry could not clear it anyway.
682
689
  const signer = signers.find(s => sameOrg(s, url.hostname));
690
+ // Which party, and how — or why there is no party (Bob 2026-09-08).
691
+ const how = signer
692
+ ? ` ${signer} signed this message; "Trust ${signer} as an intermediary" stops this warning for links through ${signer} in mail it signs.`
693
+ : ` Nobody signed this message for ${url.hostname}, so there is no intermediary to trust; only the sender could vouch for the link.`;
683
694
  return {
684
695
  id: "redirector-link",
685
696
  severity: "caution",
686
697
  text: `A link hides where it goes: it passes through ${url.hostname} and ends at ${target.hostname}.`,
687
- detail: `${url.hostname} -> ${target.hostname}`,
698
+ detail: `${url.hostname} -> ${target.hostname}.${how}`,
688
699
  ...(signer ? { via: signer } : {}),
689
700
  };
690
701
  }