@bobfrankston/mailx-types 0.1.98 → 0.1.100
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/mailx-api.d.ts +1 -0
- package/package.json +1 -1
- package/trust.d.ts +4 -0
- package/trust.js +17 -1
package/mailx-api.d.ts
CHANGED
package/package.json
CHANGED
package/trust.d.ts
CHANGED
|
@@ -69,6 +69,10 @@ export interface TrustFinding {
|
|
|
69
69
|
* viewer can offer to trust the sender when that relay signs for it
|
|
70
70
|
* (allowlist.jsonc `trustedSendersVia`). (2026-09-10) */
|
|
71
71
|
senderVia?: string;
|
|
72
|
+
/** The proved sender domain whose trust would clear this finding — set
|
|
73
|
+
* on a redirector warning when the sender is proved but not yet on the
|
|
74
|
+
* reader's list, so the viewer can offer "Stop warning about". (2026-09-11) */
|
|
75
|
+
sender?: string;
|
|
72
76
|
}
|
|
73
77
|
export interface TrustInput {
|
|
74
78
|
/** Every header line, in order, as mailparser's `headerLines`. Repeated
|
package/trust.js
CHANGED
|
@@ -847,6 +847,19 @@ function provedSenderDomain(input) {
|
|
|
847
847
|
function redirectorLink(input) {
|
|
848
848
|
const bodyHtml = input.bodyHtml || "";
|
|
849
849
|
const senderDomain = provedSenderDomain(input);
|
|
850
|
+
// 5. (2026-09-11) The proved sender is one the reader trusts. The
|
|
851
|
+
// finding's own words were "only the sender could vouch for the
|
|
852
|
+
// link" — and the reader has vouched for the sender. A Toast receipt
|
|
853
|
+
// (dmarc=pass toasttab.com, toasttab.com on Bob's list) links through
|
|
854
|
+
// toasttakeout.page.link, Firebase's per-app redirector, to
|
|
855
|
+
// toasttakeout.com: two organisations by hostname, nobody signed for
|
|
856
|
+
// page.link, the sender is neither — rules 1 to 4 all miss, and
|
|
857
|
+
// Bob: "I trust toasttakeout.com. There should be a trust button."
|
|
858
|
+
// Trust counts only with proof, as everywhere else: without the
|
|
859
|
+
// server's pass the list would be a switch a forger flips by typing a
|
|
860
|
+
// trusted domain into From.
|
|
861
|
+
if (senderDomain && input.senderTrusted)
|
|
862
|
+
return null;
|
|
850
863
|
// 3. (2026-09-08) The redirector belongs to a reader-listed intermediary
|
|
851
864
|
// that provably handled the message. Google Calendar wraps every link
|
|
852
865
|
// in an invitation as google.com/url?q=…, signs the mail d=google.com,
|
|
@@ -891,13 +904,16 @@ function redirectorLink(input) {
|
|
|
891
904
|
// Which party, and how — or why there is no party (Bob 2026-09-08).
|
|
892
905
|
const how = signer
|
|
893
906
|
? ` ${signer} signed this message; "Trust ${signer} as an intermediary" stops this warning for links through ${signer} in mail it signs.`
|
|
894
|
-
:
|
|
907
|
+
: senderDomain
|
|
908
|
+
? ` Nobody signed this message for ${url.hostname}, so there is no intermediary to trust; ${senderDomain} proved it sent this, and "Stop warning about *@${senderDomain}" lets it vouch for its own links.`
|
|
909
|
+
: ` Nobody signed this message for ${url.hostname}, so there is no intermediary to trust; only the sender could vouch for the link, and nothing proves who the sender is.`;
|
|
895
910
|
return {
|
|
896
911
|
id: "redirector-link",
|
|
897
912
|
severity: "caution",
|
|
898
913
|
text: `A link hides where it goes: it passes through ${url.hostname} and ends at ${target.hostname}.`,
|
|
899
914
|
detail: `${url.hostname} -> ${target.hostname}.${how}`,
|
|
900
915
|
...(signer ? { via: signer } : {}),
|
|
916
|
+
...(senderDomain && !signer ? { sender: senderDomain } : {}),
|
|
901
917
|
};
|
|
902
918
|
}
|
|
903
919
|
}
|