@bobfrankston/mailx-types 0.1.53 → 0.1.57

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 (3) hide show
  1. package/index.d.ts +8 -1
  2. package/index.js +25 -2
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -253,10 +253,17 @@ export interface MailxSettings {
253
253
  accounts: AccountConfig[];
254
254
  ui: {
255
255
  theme: "system" | "dark" | "light";
256
- editor: "quill" | "tiptap";
256
+ editor: "quill" | "tiptap" | "tinymce";
257
257
  folderWidth: number;
258
258
  listViewerSplit: number; /** Percentage for message list height */
259
+ /** Root font-size in px — scales the whole app chrome (rem-based CSS). */
259
260
  fontSize: number;
261
+ /** Editor body font-size in px. DISPLAY ONLY — it reaches the editors as
262
+ * a content stylesheet / CSS var and is never serialized into outgoing
263
+ * mail, so changing it cannot affect recipients. Distinct from
264
+ * `fontSize` above, which is the app chrome. Was read by app.ts and
265
+ * compose.ts but never declared here (Bob 2026-08-19). */
266
+ composeFontSize: number;
260
267
  };
261
268
  sync: {
262
269
  intervalMinutes: number;
package/index.js CHANGED
@@ -479,9 +479,32 @@ export function displayNameClaimsOtherAddress(name, address) {
479
479
  const m = n.match(/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g);
480
480
  if (!m)
481
481
  return null;
482
+ const realDomain = real.split("@").pop() || "";
482
483
  for (const claimed of m) {
483
- if (claimed.toLowerCase() !== real)
484
- return claimed;
484
+ if (claimed.toLowerCase() === real)
485
+ continue;
486
+ // Same organisation is not impersonation. Plenty of legitimate senders
487
+ // put a contact address in the display name that differs from the
488
+ // envelope address at the same org — IEEE Xplore alerts arrive as
489
+ // `"Content-Alert@ieee.org" <no-reply@xplore.ieee.org>`, which the
490
+ // first cut flagged in danger red and read as a spam marker
491
+ // (Bob 2026-08-20: "marked as spam but is a valid message"; that
492
+ // message passes SPF, DKIM and DMARC and SpamAssassin scores it -2.0).
493
+ //
494
+ // Sub/parent-domain rather than "same registrable domain" on purpose:
495
+ // comparing the last two labels would treat paypal.co.uk and
496
+ // evil.co.uk as related, which is exactly the case that must stay
497
+ // flagged. A subdomain relationship cannot be forged across orgs.
498
+ const claimedDomain = claimed.toLowerCase().split("@").pop() || "";
499
+ if (claimedDomain && realDomain) {
500
+ if (claimedDomain === realDomain)
501
+ continue;
502
+ if (claimedDomain.endsWith("." + realDomain))
503
+ continue;
504
+ if (realDomain.endsWith("." + claimedDomain))
505
+ continue;
506
+ }
507
+ return claimed;
485
508
  }
486
509
  return null;
487
510
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-types",
3
- "version": "0.1.53",
3
+ "version": "0.1.57",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",