@bobfrankston/mailx-store 0.1.101 → 0.1.105
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/package.json +5 -5
- package/store.js +15 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-store",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.105",
|
|
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.
|
|
13
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
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.
|
|
33
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
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,18 @@ 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
|
+
const senders = (allowList.senders || []).map((s) => (s || "").toLowerCase());
|
|
282
|
+
const domains = (allowList.domains || []).map((d) => (d || "").toLowerCase());
|
|
283
|
+
const senderTrusted = senders.includes(senderAddr) || domains.includes(senderDomain);
|
|
274
284
|
if (!allowRemote) {
|
|
275
|
-
|
|
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))) {
|
|
285
|
+
if (senderTrusted || rcptAddrs.some((a) => recipients.includes(a))) {
|
|
280
286
|
allowRemote = true;
|
|
281
287
|
}
|
|
282
288
|
}
|
|
@@ -548,6 +554,10 @@ export class Store {
|
|
|
548
554
|
headerLines: trustHeaderLines,
|
|
549
555
|
fromAddress: envelope.from?.address || "",
|
|
550
556
|
ownAddresses: [...recipients, (deliveredTo.match(/[^\s<>]+@[^\s<>]+/) || [""])[0]].filter(Boolean),
|
|
557
|
+
// The reader's own answer to "is this wanted", which no score can
|
|
558
|
+
// reach. Suppresses the bulk/association note on a PROVED sender
|
|
559
|
+
// only; forgery evidence is never silenced by a list.
|
|
560
|
+
senderTrusted,
|
|
551
561
|
bodyHtml,
|
|
552
562
|
bodyText,
|
|
553
563
|
};
|