@push.rocks/smartmta 11.0.2 → 12.0.0

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/changelog.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-10-15 - 12.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - Inbound messages are parsed with `@push.rocks/smartmail` (postal-mime) instead of `mailparser`, and `Email.headers` changes with it: values are the raw field values as written (unfolded; a repeated field joins its values with `, `) instead of mailparser's interpreted forms. mailparser's derived keys are gone: `priority` (now the message's own `x-priority`/`importance` fields) and `list` (now `list-id`, `list-unsubscribe` and the other `list-*` fields), and structured fields such as `dkim-signature` and `list-*` carry their text instead of `[object Object]`. A route whose `match.headers` names `priority` or `list` no longer matches; name the raw field instead.
8
+
9
+ ### Fixes
10
+
11
+ - Scoped authenticated senders can no longer place an out-of-scope identity in the header From. Every mailbox of every From field is now checked, with groups flattened into their members and repeated From fields all kept; before, a group (`From: Board: ceo@victim.test;`) or a second From field after an out-of-scope first one was accepted. A From field that yields no mailbox (an empty group, or an encoded word in place of the address), a message whose first line is a `From :` field (which an mbox reader drops as a postmark) and an unreadable header section are now refused with 553. A message without any From field is still accepted, because its sender is the scope-checked envelope MAIL FROM.
12
+ - `Email.from` is the first mailbox of the From fields in message order, groups flattened, and falls back to the envelope MAIL FROM only when no From field yields a mailbox; before, a repeated From field gave the last one and a group gave the envelope sender.
13
+ - The text of a message that carries only HTML is derived by smartmail's `htmlToText`: headings are no longer upper-cased, and a message whose HTML body sits in a `multipart/related` part (an inline image next to it) gets its text too instead of an empty one.
14
+ - Inline images keep their `cid:` link in `Email.html`, and their attachment carries the `contentId` the link names, instead of the image being copied into the HTML as a `data:` URI.
15
+ - Header To and Cc (used when the envelope has no recipients) include the members of a group; mailparser's addresses left them out.
16
+ - A quoted local part keeps its quotes in the From mailboxes the sender scope is checked against (`"john doe"@one.test`), as the address is written.
17
+ - Removes `mailparser` and its `nodemailer` / `deepmerge-ts` advisory subtree from the runtime dependencies; `@push.rocks/smartmail` moves to ^3.1.0.
18
+
19
+ ### Maintenance
20
+
21
+ - release tooling: @git.zone/cli 9.0.1, @git.zone/tsrust 4.6.0
22
+
23
+ ## 2026-10-14 - 11.1.0
24
+
25
+ ### Features
26
+
27
+ - Run inside Node.js single executable applications: `@push.rocks/smartrust` moves from `^1.3.2` to `^2.6.0`, so inside a SEA `RustSecurityBridge` runs the sidecar embedded under `mailer-bin` (`@git.zone/tssea`) and searches no local path; outside a SEA the bundled `dist_rust` binaries are found as before. The public API is unchanged.
28
+
29
+ ### Fixes
30
+
31
+ - `engines.node` is `>=22.12.0`, the floor the dependencies need: `@push.rocks/smartsea` (through smartrust 2.6) requires Node.js 22.3 and `yargs-parser` 22 (through `@push.rocks/smartlog`) 22.12 on the 22 line. It said `>=22`.
32
+
33
+ ### Maintenance
34
+
35
+ - release tooling: pnpm 12.10.1, @git.zone/tstest 8.0.0, @git.zone/tsrust 4.5.1
36
+
3
37
  ## 2026-10-13 - 11.0.2
4
38
 
5
39
  ### Maintenance
@@ -3,11 +3,11 @@
3
3
  "binarySha256": "d698d8d0af565269b930e9af77e6046ca80d5c159e5aca55d2e2aa0c73a96f14",
4
4
  "buildInfo": {
5
5
  "projectName": "@push.rocks/smartmta",
6
- "projectVersion": "11.0.2",
7
- "gitCommit": "0d9918b6e3f1cbea47f970eea610dd28e8a64c29",
6
+ "projectVersion": "12.0.0",
7
+ "gitCommit": "b1d1024df37a33ff14a0e46195c500f11161fb17",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-10-13T14:24:07.178Z",
10
- "tsrustVersion": "4.5.0",
9
+ "builtAt": "2026-10-15T06:23:07.408Z",
10
+ "tsrustVersion": "4.6.0",
11
11
  "binary": "mailer-bin",
12
12
  "target": "linux_amd64"
13
13
  }
@@ -3,11 +3,11 @@
3
3
  "binarySha256": "2e5502aaff345b35f16840f14c28e7b50c13b45f7015025021913006d6774f1c",
4
4
  "buildInfo": {
5
5
  "projectName": "@push.rocks/smartmta",
6
- "projectVersion": "11.0.2",
7
- "gitCommit": "0d9918b6e3f1cbea47f970eea610dd28e8a64c29",
6
+ "projectVersion": "12.0.0",
7
+ "gitCommit": "b1d1024df37a33ff14a0e46195c500f11161fb17",
8
8
  "gitDirty": false,
9
- "builtAt": "2026-10-13T14:31:01.528Z",
10
- "tsrustVersion": "4.5.0",
9
+ "builtAt": "2026-10-15T06:25:31.432Z",
10
+ "tsrustVersion": "4.6.0",
11
11
  "binary": "mailer-bin",
12
12
  "target": "linux_arm64"
13
13
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartmta',
6
- version: '11.0.2',
6
+ version: '12.0.0',
7
7
  description: 'A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxzQkFBc0I7SUFDNUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHlIQUF5SDtDQUN2SSxDQUFBIn0=
@@ -663,14 +663,22 @@ export declare class UnifiedEmailServer extends EventEmitter {
663
663
  */
664
664
  private resolveSessionSenderScope;
665
665
  /**
666
- * Extract every mailbox address from the parsed From header. The Email
667
- * abstraction keeps only the first From mailbox, which is not sufficient
668
- * for scope enforcement: `From: allowed@a.com, victim@b.com` must not
669
- * pass. Parsing stops at the first CRLFCRLF header boundary when present
670
- * (the Rust receiver normalizes line endings to CRLF); a bodyless message
671
- * without one is parsed whole.
666
+ * The mailbox addresses of every From header field, one list per field in
667
+ * message order. Groups are flattened into their member mailboxes, and a
668
+ * repeated From field is kept rather than collapsed to one occurrence,
669
+ * because scope enforcement and Email.from must see every mailbox a
670
+ * recipient's client might display. A field that yields no mailbox, such
671
+ * as an empty group or an encoded word in place of an address, gives an
672
+ * empty list.
672
673
  */
673
- private parseHeaderFromMailboxes;
674
+ private parseFromHeaderFields;
675
+ /**
676
+ * The From header fields of the header section of a raw message, see
677
+ * parseFromHeaderFields. Parsing stops at the first CRLFCRLF header
678
+ * boundary when present (the Rust receiver normalizes line endings to
679
+ * CRLF); a bodyless message without one is parsed whole.
680
+ */
681
+ private parseHeaderFromFields;
674
682
  /**
675
683
  * Header-From alignment for scoped authenticated accounts at DATA. The
676
684
  * envelope MAIL FROM is enforced per recipient via resolveRecipientPolicy
@@ -715,7 +723,6 @@ export declare class UnifiedEmailServer extends EventEmitter {
715
723
  private handleRustEmailReceived;
716
724
  private createEmailFromBuffer;
717
725
  private isStandardParsedHeader;
718
- private stringifyParsedHeaderValue;
719
726
  /**
720
727
  * Compute SCRAM-SHA-256 credential fields from a plaintext password with a
721
728
  * fresh random salt (used for legacy plaintext credentials only; verifier