@bobfrankston/mailx-store 0.1.103 → 0.1.107

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 +5 -5
  2. package/store.js +30 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-store",
3
- "version": "0.1.103",
3
+ "version": "0.1.107",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -9,8 +9,8 @@
9
9
  },
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@bobfrankston/mailx-types": "^0.1.71",
13
- "@bobfrankston/mailx-settings": "^0.1.67",
12
+ "@bobfrankston/mailx-types": "^0.1.73",
13
+ "@bobfrankston/mailx-settings": "^0.1.69",
14
14
  "@bobfrankston/mailx-bus": "^0.1.2",
15
15
  "mailparser": "^3.7.2"
16
16
  },
@@ -29,8 +29,8 @@
29
29
  },
30
30
  ".transformedSnapshot": {
31
31
  "dependencies": {
32
- "@bobfrankston/mailx-types": "^0.1.71",
33
- "@bobfrankston/mailx-settings": "^0.1.67",
32
+ "@bobfrankston/mailx-types": "^0.1.73",
33
+ "@bobfrankston/mailx-settings": "^0.1.69",
34
34
  "@bobfrankston/mailx-bus": "^0.1.2",
35
35
  "mailparser": "^3.7.2"
36
36
  }
package/store.js CHANGED
@@ -271,12 +271,33 @@ export class Store {
271
271
  .map((a) => (a.address || "").toLowerCase());
272
272
  // Allowlist auto-allow: trusted sender / domain / recipient skips
273
273
  // sanitization. Same rule as the legacy service implementation.
274
+ //
275
+ // senderTrusted is deliberately NARROWER than allowRemote: it is only
276
+ // the sender and domain lists, the two the reader fills in by saying
277
+ // "this correspondent is fine". A recipient-alias match says the mail
278
+ // reached an address of the reader's, which permits images but is not
279
+ // a statement about who sent it — and the trust banner asks about the
280
+ // sender. (Claude Code 2026-08-28)
281
+ //
282
+ // Two lists, two questions. `senders`/`domains` came from the
283
+ // remote-content banner and mean "load their images"; loading someone's
284
+ // images implies trusting them, so they count here too.
285
+ // `trustedSenders`/`trustedDomains` mean ONLY "stop warning me about
286
+ // this sender" — Bob 2026-08-28: "I don't need the spam reminder but I
287
+ // don't want to say show remote content in order to prevent tracking."
288
+ // They must never widen allowRemote.
289
+ const senders = (allowList.senders || []).map((s) => (s || "").toLowerCase());
290
+ const domains = (allowList.domains || []).map((d) => (d || "").toLowerCase());
291
+ const trustedSenders = (allowList.trustedSenders || []).map((s) => (s || "").toLowerCase());
292
+ const trustedDomains = (allowList.trustedDomains || []).map((d) => (d || "").toLowerCase());
293
+ const senderTrusted = senders.includes(senderAddr) || domains.includes(senderDomain)
294
+ || trustedSenders.includes(senderAddr) || trustedDomains.includes(senderDomain);
274
295
  if (!allowRemote) {
275
- const senders = (allowList.senders || []).map((s) => (s || "").toLowerCase());
276
- const domains = (allowList.domains || []).map((d) => (d || "").toLowerCase());
277
- if (senders.includes(senderAddr) ||
278
- domains.includes(senderDomain) ||
279
- rcptAddrs.some((a) => recipients.includes(a))) {
296
+ // Deliberately NOT senderTrusted: that now also covers the
297
+ // quiet-the-banner list, and quieting a banner must never turn on
298
+ // a tracking pixel.
299
+ if (senders.includes(senderAddr) || domains.includes(senderDomain)
300
+ || rcptAddrs.some((a) => recipients.includes(a))) {
280
301
  allowRemote = true;
281
302
  }
282
303
  }
@@ -548,6 +569,10 @@ export class Store {
548
569
  headerLines: trustHeaderLines,
549
570
  fromAddress: envelope.from?.address || "",
550
571
  ownAddresses: [...recipients, (deliveredTo.match(/[^\s<>]+@[^\s<>]+/) || [""])[0]].filter(Boolean),
572
+ // The reader's own answer to "is this wanted", which no score can
573
+ // reach. Suppresses the bulk/association note on a PROVED sender
574
+ // only; forgery evidence is never silenced by a list.
575
+ senderTrusted,
551
576
  bodyHtml,
552
577
  bodyText,
553
578
  };