@push.rocks/smartmta 9.5.0 → 9.6.1

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 (44) hide show
  1. package/changelog.md +41 -0
  2. package/dist_rust/mailer-bin_linux_amd64 +0 -0
  3. package/dist_rust/mailer-bin_linux_amd64.tsrust-build.json +14 -0
  4. package/dist_rust/mailer-bin_linux_arm64 +0 -0
  5. package/dist_rust/mailer-bin_linux_arm64.tsrust-build.json +14 -0
  6. package/dist_ts/00_commitinfo_data.js +1 -1
  7. package/dist_ts/index.d.ts +1 -0
  8. package/dist_ts/index.js +2 -1
  9. package/dist_ts/mail/routing/classes.unified.email.server.d.ts +140 -4
  10. package/dist_ts/mail/routing/classes.unified.email.server.js +371 -97
  11. package/dist_ts/mail/routing/interfaces.d.ts +41 -0
  12. package/notices/aws-lc-sys-0.43.0-fiat-license.txt +22 -0
  13. package/notices/cargo-dependencies.html +4706 -0
  14. package/notices/compiler-builtins-license.txt +275 -0
  15. package/notices/crossbeam-channel-third-party.txt +593 -0
  16. package/notices/encoding-rs-copyright.txt +61 -0
  17. package/notices/glibc-copying-lesser.txt +502 -0
  18. package/notices/glibc-licenses.txt +412 -0
  19. package/notices/inventory.json +1226 -0
  20. package/notices/libgcc-gpl-3.0.txt +674 -0
  21. package/notices/libgcc-runtime-exception.txt +73 -0
  22. package/notices/mimalloc-license.txt +21 -0
  23. package/notices/moka-notice.txt +14 -0
  24. package/notices/ring-0.17.14-fiat-license.txt +15 -0
  25. package/notices/ring-0.17.14-license-boringssl.txt +272 -0
  26. package/notices/ring-0.17.14-license-other-bits.txt +13 -0
  27. package/notices/ring-0.17.14-license.txt +9 -0
  28. package/notices/ring-0.17.14-once-cell-license-apache.txt +201 -0
  29. package/notices/ring-0.17.14-once-cell-license-mit.txt +23 -0
  30. package/notices/rust-standard-library.html +8266 -0
  31. package/notices/rustversion-1.0.23-license-mit.txt +23 -0
  32. package/notices/source-attributions.txt +294 -0
  33. package/notices/wasm-bindgen-license-mit.txt +25 -0
  34. package/notices/zerocopy-derive-0.8.55-license-mit.txt +26 -0
  35. package/notices/zstd-license.txt +30 -0
  36. package/package.json +8 -6
  37. package/readme.md +70 -2
  38. package/third-party-notices.md +171 -0
  39. package/ts/00_commitinfo_data.ts +1 -1
  40. package/ts/index.ts +1 -0
  41. package/ts/mail/routing/classes.unified.email.server.ts +452 -108
  42. package/ts/mail/routing/interfaces.ts +43 -0
  43. package/readme.hints.md +0 -45
  44. package/readme.plan.md +0 -30
@@ -0,0 +1,23 @@
1
+ Permission is hereby granted, free of charge, to any
2
+ person obtaining a copy of this software and associated
3
+ documentation files (the "Software"), to deal in the
4
+ Software without restriction, including without
5
+ limitation the rights to use, copy, modify, merge,
6
+ publish, distribute, sublicense, and/or sell copies of
7
+ the Software, and to permit persons to whom the Software
8
+ is furnished to do so, subject to the following
9
+ conditions:
10
+
11
+ The above copyright notice and this permission notice
12
+ shall be included in all copies or substantial portions
13
+ of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
16
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
17
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
18
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
22
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
+ DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,294 @@
1
+ Additional source attributions for SmartMTA's mailer-bin executables
2
+ ===================================================================
3
+
4
+ Each section below reproduces a copyright or attribution file that the named
5
+ published crate ships next to its license terms. The selected license texts
6
+ themselves are in notices/cargo-dependencies.html; these files carry the
7
+ copyright notices and upstream attributions that the license texts require to
8
+ be retained. Every section is copied verbatim from the published crate.
9
+
10
+ ==============================================================================
11
+ charset 0.1.5 -- COPYRIGHT (COPYRIGHT)
12
+ ==============================================================================
13
+
14
+ charset is copyright 2013-2016 Mozilla Foundation.
15
+
16
+ Licensed under the Apache License, Version 2.0
17
+ <LICENSE-APACHE or
18
+ https://www.apache.org/licenses/LICENSE-2.0> or the MIT
19
+ license <LICENSE-MIT or https://opensource.org/licenses/MIT>,
20
+ at your option. All files in the project carrying such
21
+ notice may not be copied, modified, or distributed except
22
+ according to those terms.
23
+
24
+ Test code within encoding_rs is dedicated to the Public Domain when so
25
+ designated (see the individual files for PD/CC0-dedicated sections).
26
+
27
+ ==============================================================================
28
+ enum-as-inner 0.6.1 -- copyright.txt (copyright.txt)
29
+ ==============================================================================
30
+
31
+ // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
32
+ //
33
+ // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
34
+ // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
35
+ // http://opensource.org/licenses/MIT>, at your option. This file may not be
36
+ // copied, modified, or distributed except according to those terms.
37
+
38
+ ==============================================================================
39
+ linux-raw-sys 0.12.1 -- COPYRIGHT (COPYRIGHT)
40
+ ==============================================================================
41
+
42
+ Short version for non-lawyers:
43
+
44
+ `linux-raw-sys` is triple-licensed under Apache 2.0 with the LLVM Exception,
45
+ Apache 2.0, and MIT terms.
46
+
47
+
48
+ Longer version:
49
+
50
+ Copyrights in the `linux-raw-sys` project are retained by their contributors.
51
+ No copyright assignment is required to contribute to the `linux-raw-sys`
52
+ project.
53
+
54
+ Some files include code derived from Rust's `libstd`; see the comments in
55
+ the code for details.
56
+
57
+ Except as otherwise noted (below and/or in individual files), `linux-raw-sys`
58
+ is licensed under:
59
+
60
+ - the Apache License, Version 2.0, with the LLVM Exception
61
+ <LICENSE-Apache-2.0_WITH_LLVM-exception> or
62
+ <http://llvm.org/foundation/relicensing/LICENSE.txt>
63
+ - the Apache License, Version 2.0
64
+ <LICENSE-APACHE> or
65
+ <http://www.apache.org/licenses/LICENSE-2.0>,
66
+ - or the MIT license
67
+ <LICENSE-MIT> or
68
+ <http://opensource.org/licenses/MIT>,
69
+
70
+ at your option.
71
+
72
+ ==============================================================================
73
+ miniz_oxide 0.8.9 -- LICENSE (LICENSE)
74
+ ==============================================================================
75
+
76
+ MIT License
77
+
78
+ Copyright 2013-2014 RAD Game Tools and Valve Software
79
+ Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
80
+ Copyright (c) 2017 Frommi
81
+ Copyright (c) 2017-2024 oyvindln
82
+
83
+
84
+ Permission is hereby granted, free of charge, to any person obtaining a copy
85
+ of this software and associated documentation files (the "Software"), to deal
86
+ in the Software without restriction, including without limitation the rights
87
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
88
+ copies of the Software, and to permit persons to whom the Software is
89
+ furnished to do so, subject to the following conditions:
90
+
91
+ The above copyright notice and this permission notice shall be included in all
92
+ copies or substantial portions of the Software.
93
+
94
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
95
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
96
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
97
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
98
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
99
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
100
+ SOFTWARE.
101
+
102
+ ==============================================================================
103
+ rand 0.9.5 -- COPYRIGHT (COPYRIGHT)
104
+ ==============================================================================
105
+
106
+ Copyrights in the Rand project are retained by their contributors. No
107
+ copyright assignment is required to contribute to the Rand project.
108
+
109
+ For full authorship information, see the version control history.
110
+
111
+ Except as otherwise noted (below and/or in individual files), Rand is
112
+ licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
113
+ <http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
114
+ <LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.
115
+
116
+ The Rand project includes code from the Rust project
117
+ published under these same licenses.
118
+
119
+ ==============================================================================
120
+ rand_chacha 0.9.0 -- COPYRIGHT (COPYRIGHT)
121
+ ==============================================================================
122
+
123
+ Copyrights in the Rand project are retained by their contributors. No
124
+ copyright assignment is required to contribute to the Rand project.
125
+
126
+ For full authorship information, see the version control history.
127
+
128
+ Except as otherwise noted (below and/or in individual files), Rand is
129
+ licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
130
+ <http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
131
+ <LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.
132
+
133
+ The Rand project includes code from the Rust project
134
+ published under these same licenses.
135
+
136
+ ==============================================================================
137
+ rand_core 0.9.5 -- COPYRIGHT (COPYRIGHT)
138
+ ==============================================================================
139
+
140
+ Copyrights in the Rand project are retained by their contributors. No
141
+ copyright assignment is required to contribute to the Rand project.
142
+
143
+ For full authorship information, see the version control history.
144
+
145
+ Except as otherwise noted (below and/or in individual files), Rand is
146
+ licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
147
+ <http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
148
+ <LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.
149
+
150
+ The Rand project includes code from the Rust project
151
+ published under these same licenses.
152
+
153
+ ==============================================================================
154
+ regex-syntax 0.8.11 -- LICENSE-UNICODE (src/unicode_tables/LICENSE-UNICODE)
155
+ ==============================================================================
156
+
157
+ UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
158
+
159
+ Unicode Data Files include all data files under the directories
160
+ http://www.unicode.org/Public/, http://www.unicode.org/reports/,
161
+ http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
162
+ http://www.unicode.org/utility/trac/browser/.
163
+
164
+ Unicode Data Files do not include PDF online code charts under the
165
+ directory http://www.unicode.org/Public/.
166
+
167
+ Software includes any source code published in the Unicode Standard
168
+ or under the directories
169
+ http://www.unicode.org/Public/, http://www.unicode.org/reports/,
170
+ http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
171
+ http://www.unicode.org/utility/trac/browser/.
172
+
173
+ NOTICE TO USER: Carefully read the following legal agreement.
174
+ BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
175
+ DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
176
+ YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
177
+ TERMS AND CONDITIONS OF THIS AGREEMENT.
178
+ IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
179
+ THE DATA FILES OR SOFTWARE.
180
+
181
+ COPYRIGHT AND PERMISSION NOTICE
182
+
183
+ Copyright © 1991-2018 Unicode, Inc. All rights reserved.
184
+ Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
185
+
186
+ Permission is hereby granted, free of charge, to any person obtaining
187
+ a copy of the Unicode data files and any associated documentation
188
+ (the "Data Files") or Unicode software and any associated documentation
189
+ (the "Software") to deal in the Data Files or Software
190
+ without restriction, including without limitation the rights to use,
191
+ copy, modify, merge, publish, distribute, and/or sell copies of
192
+ the Data Files or Software, and to permit persons to whom the Data Files
193
+ or Software are furnished to do so, provided that either
194
+ (a) this copyright and permission notice appear with all copies
195
+ of the Data Files or Software, or
196
+ (b) this copyright and permission notice appear in associated
197
+ Documentation.
198
+
199
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
200
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
201
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
202
+ NONINFRINGEMENT OF THIRD PARTY RIGHTS.
203
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
204
+ NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
205
+ DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
206
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
207
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
208
+ PERFORMANCE OF THE DATA FILES OR SOFTWARE.
209
+
210
+ Except as contained in this notice, the name of a copyright holder
211
+ shall not be used in advertising or otherwise to promote the sale,
212
+ use or other dealings in these Data Files or Software without prior
213
+ written authorization of the copyright holder.
214
+
215
+ ==============================================================================
216
+ rustix 1.1.4 -- COPYRIGHT (COPYRIGHT)
217
+ ==============================================================================
218
+
219
+ Short version for non-lawyers:
220
+
221
+ `rustix` is triple-licensed under Apache 2.0 with the LLVM Exception,
222
+ Apache 2.0, and MIT terms.
223
+
224
+
225
+ Longer version:
226
+
227
+ Copyrights in the `rustix` project are retained by their contributors.
228
+ No copyright assignment is required to contribute to the `rustix`
229
+ project.
230
+
231
+ Some files include code derived from Rust's `libstd`; see the comments in
232
+ the code for details.
233
+
234
+ Except as otherwise noted (below and/or in individual files), `rustix`
235
+ is licensed under:
236
+
237
+ - the Apache License, Version 2.0, with the LLVM Exception
238
+ <LICENSE-Apache-2.0_WITH_LLVM-exception> or
239
+ <http://llvm.org/foundation/relicensing/LICENSE.txt>
240
+ - the Apache License, Version 2.0
241
+ <LICENSE-APACHE> or
242
+ <http://www.apache.org/licenses/LICENSE-2.0>,
243
+ - or the MIT license
244
+ <LICENSE-MIT> or
245
+ <http://opensource.org/licenses/MIT>,
246
+
247
+ at your option.
248
+
249
+ ==============================================================================
250
+ utf8_iter 1.0.4 -- COPYRIGHT (COPYRIGHT)
251
+ ==============================================================================
252
+
253
+ Copyright Mozilla Foundation
254
+
255
+ Licensed under the Apache License (Version 2.0), or the MIT license,
256
+ (the "Licenses") at your option. You may not use this file except in
257
+ compliance with one of the Licenses. You may obtain copies of the
258
+ Licenses at:
259
+
260
+ https://www.apache.org/licenses/LICENSE-2.0
261
+ https://opensource.org/licenses/MIT
262
+
263
+ Unless required by applicable law or agreed to in writing, software
264
+ distributed under the Licenses is distributed on an "AS IS" BASIS,
265
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
266
+ See the Licenses for the specific language governing permissions and
267
+ limitations under the Licenses.
268
+
269
+ --
270
+
271
+ Test code is dedicated to the Public Domain when so designated (see
272
+ the individual files for PD/CC0-dedicated sections).
273
+
274
+ --
275
+
276
+ The implementation for Utf8CharIndices was adapted from the
277
+ CharIndices implementation of the Rust standard library at revision
278
+ ab32548539ec38a939c1b58599249f3b54130026
279
+ (https://github.com/rust-lang/rust/blob/ab32548539ec38a939c1b58599249f3b54130026/library/core/src/str/iter.rs).
280
+
281
+ Excerpt from https://github.com/rust-lang/rust/blob/ab32548539ec38a939c1b58599249f3b54130026/COPYRIGHT ,
282
+ which refers to
283
+ https://github.com/rust-lang/rust/blob/ab32548539ec38a939c1b58599249f3b54130026/LICENSE-APACHE
284
+ and
285
+ https://github.com/rust-lang/rust/blob/ab32548539ec38a939c1b58599249f3b54130026/LICENSE-MIT
286
+ :
287
+
288
+ For full authorship information, see the version control history or
289
+ https://thanks.rust-lang.org
290
+
291
+ Except as otherwise noted (below and/or in individual files), Rust is
292
+ licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
293
+ <http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
294
+ <LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.
@@ -0,0 +1,25 @@
1
+ Copyright (c) 2014 Alex Crichton
2
+
3
+ Permission is hereby granted, free of charge, to any
4
+ person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the
6
+ Software without restriction, including without
7
+ limitation the rights to use, copy, modify, merge,
8
+ publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software
10
+ is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice
14
+ shall be included in all copies or substantial portions
15
+ of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25
+ DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,26 @@
1
+ Copyright 2023 The Fuchsia Authors
2
+
3
+ Permission is hereby granted, free of charge, to any
4
+ person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the
6
+ Software without restriction, including without
7
+ limitation the rights to use, copy, modify, merge,
8
+ publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software
10
+ is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice
14
+ shall be included in all copies or substantial portions
15
+ of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25
+ DEALINGS IN THE SOFTWARE.
26
+
@@ -0,0 +1,30 @@
1
+ BSD License
2
+
3
+ For Zstandard software
4
+
5
+ Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without modification,
8
+ are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name Facebook, nor Meta, nor the names of its contributors may
18
+ be used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@push.rocks/smartmta",
3
- "version": "9.5.0",
3
+ "version": "9.6.1",
4
4
  "description": "A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.",
5
5
  "keywords": [
6
6
  "mta",
@@ -31,12 +31,12 @@
31
31
  ".": "./dist_ts/index.js"
32
32
  },
33
33
  "devDependencies": {
34
- "@git.zone/cli": "^3.0.1",
35
- "@git.zone/tsbuild": "4.4.2",
36
- "@git.zone/tsrust": "^1.7.0",
37
- "@git.zone/tstest": "^3.6.7",
34
+ "@git.zone/cli": "^6.13.2",
35
+ "@git.zone/tsbuild": "4.4.3",
36
+ "@git.zone/tsrust": "^1.13.0",
37
+ "@git.zone/tstest": "6.1.0",
38
38
  "@types/mailparser": "^3.4.6",
39
- "@types/node": "^26.1.1",
39
+ "@types/node": "26.5.0",
40
40
  "tsx": "^4.23.1"
41
41
  },
42
42
  "dependencies": {
@@ -54,7 +54,9 @@
54
54
  "ts/**/*",
55
55
  "dist_ts/**/*",
56
56
  "dist_rust/**/*",
57
+ "notices/**/*",
57
58
  "readme.md",
59
+ "third-party-notices.md",
58
60
  "license",
59
61
  "changelog.md"
60
62
  ],
package/readme.md CHANGED
@@ -171,6 +171,11 @@ const emailServer = new UnifiedEmailServer(dcRouterRef, {
171
171
  securePort: 465,
172
172
  recipientValidationTimeoutMs: 5000,
173
173
 
174
+ // Timeout for hooks.onAuthenticate before failing the attempt closed.
175
+ // Defaults to 4000. The SMTP listener abandons the AUTH round trip after a
176
+ // fixed 5000 ms, so larger values are clamped to 4500 with a warning.
177
+ authenticationTimeoutMs: 4000,
178
+
174
179
  // Timeout for hooks.onMessageData and hooks.onAcceptEnvelope before
175
180
  // returning a temporary SMTP failure.
176
181
  messageAcceptanceTimeoutMs: 30000,
@@ -183,6 +188,20 @@ const emailServer = new UnifiedEmailServer(dcRouterRef, {
183
188
  },
184
189
 
185
190
  hooks: {
191
+ async onAuthenticate(context) {
192
+ // Only reached for usernames auth.accounts and auth.users do not declare.
193
+ // Verify the credential however the application stores it, and return the
194
+ // send scope the resulting session must be held to.
195
+ const binding = await credentialStore.verify(context.username, context.password);
196
+ if (!binding) {
197
+ // message is logged server-side; the client always sees a plain 535.
198
+ return { accepted: false, message: 'Unknown binding' };
199
+ }
200
+ return {
201
+ accepted: true,
202
+ scope: { senders: [`*@${binding.domain}`] },
203
+ };
204
+ },
186
205
  async onRcptTo(context) {
187
206
  if (context.abortSignal?.aborted) {
188
207
  return { accepted: false, smtpCode: 451, smtpMessage: 'Recipient policy timeout' };
@@ -330,6 +349,8 @@ A submission route grants an authenticated client permission to relay. It does n
330
349
 
331
350
  Without this, an authenticated submission addressed to a domain this server hosts is accepted with `250`, relayed to that domain's MX, and destroyed by the self-MX loop guard. Everything else keeps today's behaviour: recipient-scoped `process` routes still win (consumers use them for local addresses handled by their own acceptance pipeline), `store`/`deliver`/`forward`/`reject` actions always win, and a domain registered for outbound identity only — no `inboundPolicy`, or the send-only `defaultAction: 'reject'` — keeps relaying because its real MX lives elsewhere. Encoding recipient intent in `match.headers` is not recognised for this purpose.
332
351
 
352
+ `hooks.onAuthenticate` lets the embedding application own SMTP credentials that no static configuration can express — a per-tenant binding store, a remote authority, an opaque hash such as argon2id. See [Dynamic credentials](#dynamic-credentials-hooksonauthenticate).
353
+
333
354
  `hooks.onRcptTo`, `hooks.onMessageData`, and `hooks.onAcceptEnvelope` are awaited asynchronously. If a hook throws or times out, SmartMTA returns a temporary SMTP failure. The hook context includes `abortSignal`; long-running consumers should observe it and stop work promptly. A custom `onRcptTo` hook may accept local recipients using application-specific lookup, but external relay is still blocked unless a matched route explicitly sets `allowRelay: true`.
334
355
 
335
356
  `hooks.onMessageData` runs after `DATA` and before the final SMTP response — but only for envelopes with **no** resolved `store` or `deliver` action; terminal local deliveries go through `hooks.onAcceptEnvelope` instead and never invoke `onMessageData`. Return `{ accepted: true }` only after your application has accepted responsibility for the message, such as after durable persistence. Set `continueProcessing: false` when the consumer owns all downstream processing.
@@ -413,7 +434,7 @@ Enforcement semantics:
413
434
  - **Recipient scope ("send TO who")** — with `recipients.mode: 'patterns'`, every `RCPT TO` matching no pattern is refused with `550`. `mode: 'any'` or an absent `recipients` block leaves recipients unrestricted.
414
435
  - **Patterns** are exact addresses (`a@b.com`) or glob patterns (`*@b.com`), matched case-insensitively with identical semantics to route matching. A scoped account sending with an empty `MAIL FROM <>` (null sender) is refused unless a pattern explicitly matches — `senders: ['*']` is the documented escape hatch.
415
436
  - **Route binding** — a route with `match.authenticatedUser: 'newsletter-service'` (or an array of usernames) matches only sessions authenticated as that account (exact, case-sensitive username comparison), so dedicated processing or relay routes can be attached per account. Unauthenticated sessions never match such routes.
416
- - **Rejections** surface through `onRecipientRejected` with the reasons `sender-scope`, `recipient-scope`, and `account-disabled`.
437
+ - **Rejections** surface through `onRecipientRejected` with the reasons `sender-scope`, `recipient-scope`, `account-disabled`, and `auth-scope-expired`.
417
438
  - **Live enablement** — when a configuration update transitions between zero and one-or-more accounts/users, `updateOptions` restarts only the Rust SMTP listener so the `AUTH` capability appears or disappears without a process restart. A failed listener restart logs loudly, emits `smtpListenerRestartFailed`, and leaves `isSmtpListenerActive()` false — surface that next to `getBridgeState()` in health endpoints.
418
439
  - An account without a `scope` is authenticated but unrestricted — identical to legacy `auth.users` behavior, which itself is unchanged.
419
440
 
@@ -423,6 +444,28 @@ Deriving verifiers: `deriveScramVerifier(password, iterations?)` is the canonica
423
444
 
424
445
  Compatibility probe: `smartMtaCapabilities.smtpAuthAccountsAndScopes`.
425
446
 
447
+ ### Dynamic credentials (`hooks.onAuthenticate`)
448
+
449
+ `auth.accounts` is a static list. An embedding application that mints SMTP credentials at runtime — one per tenant, per service, per binding — cannot express them that way, and cannot store them as SCRAM verifiers if its credential store is an opaque hash such as argon2id. `hooks.onAuthenticate` hands those attempts to the application instead:
450
+
451
+ ```ts
452
+ hooks: {
453
+ async onAuthenticate({ username, password, sessionId, remoteAddress, abortSignal }) {
454
+ const binding = await credentialStore.verify(username, password, { signal: abortSignal });
455
+ if (!binding) return { accepted: false, message: 'Unknown binding' };
456
+ return { accepted: true, scope: { senders: [`*@${binding.domain}`] } };
457
+ },
458
+ }
459
+ ```
460
+
461
+ - **Configuration always wins.** The hook is consulted only for usernames that neither `auth.accounts` nor `auth.users` declares. A hook can never override, weaken or second-guess a credential an operator configured — a configured username that fails its password fails, full stop. Ownership is matched **case-insensitively** while credential verification itself stays exact, so `Tenant-A` cannot slip past a configured (or deliberately `enabled: false`) `tenant-a` by changing case: it matches no exact credential, and it never reaches the hook either.
462
+ - **A configured hook enables `AUTH` on its own.** `isAuthConfigured` counts it alongside `auth.required`, `auth.users` and `auth.accounts`, so a server whose credentials are entirely dynamic still advertises `AUTH` with an empty account list. The same listener-restart behaviour applies when the hook is added or removed through `updateOptions`.
463
+ - **The returned `scope` is enforced identically to an account scope** — both the `RCPT TO` envelope check and the `DATA` header-`From` alignment check — for the lifetime of the session that authenticated. An absent `scope` is unrestricted, matching `ISmtpAuthAccount.scope`; **a hook that authenticates tenants must return one.**
464
+ - **Grants are session-bound.** They are keyed by the SMTP session that authenticated, so one session cannot inherit another's scope, and they are bounded by a hard cap of 4096 (oldest-first eviction) and a one-hour TTL. Because the listener reports no session-close event, a session may outlive its grant: that case is refused with a temporary `451` and `onRecipientRejected` reason `auth-scope-expired`, never silently treated as unrestricted. Both enforcement points refuse independently, so neither relies on the other having run first. Note the capacity edge: above 4096 concurrent hook-authenticated sessions, eviction reaches live grants, and an affected client must reconnect and authenticate again rather than being able to recover in place.
465
+ - **Failure is closed.** A throw, a `smtp.authenticationTimeoutMs` timeout, or a non-object return rejects the attempt. The client always receives the listener's standard `535 5.7.8 Authentication credentials invalid`; a `message` on the decision is recorded in the server log, never sent to the client, so a caller cannot use it to probe which usernames exist.
466
+ - **`PLAIN`/`LOGIN` only.** SCRAM requires the server to hold the salt, iteration count, stored key and server key; a hook that verifies an opaque credential cannot produce them. SCRAM credential lookups for hook-owned usernames report not-found, which is why the hook receives the password directly. Offer SCRAM only for usernames configured as `auth.accounts` verifiers.
467
+ - The hook sits on the SMTP auth path: keep it fast, and keep expensive derivation bounded. `abortSignal` fires on timeout — observe it.
468
+
426
469
  ### 📧 Sending Emails (Automatic MX Discovery)
427
470
 
428
471
  The recommended way to send email is `sendEmail()`. It defaults to **MTA mode**, which automatically resolves MX records for each recipient domain via DNS — you don't need to know the destination mail server:
@@ -948,9 +991,34 @@ tstest test/test.e2e.outbound-delivery.node.ts --verbose --timeout 60
948
991
  | `Core` | `Email`, `EmailValidator`, `TemplateManager`, `BounceManager` |
949
992
  | `Delivery` | `UnifiedDeliveryQueue`, `MultiModeDeliverySystem`, `DeliveryStatus`, `UnifiedRateLimiter` |
950
993
 
994
+ ## Third-Party Notices
995
+
996
+ The npm package ships prebuilt, statically linked Rust executables
997
+ (`dist_rust/mailer-bin_linux_amd64` and `dist_rust/mailer-bin_linux_arm64`). They
998
+ contain the locked Cargo dependency graph, the Rust standard library, glibc and
999
+ libgcc in object form, so redistributing them — for example inside a container
1000
+ image — redistributes those third-party works too.
1001
+
1002
+ [third-party-notices.md](./third-party-notices.md) is the index for that
1003
+ distribution, and the `notices/` directory holds the generated cargo-about
1004
+ inventory (`notices/cargo-dependencies.html`), the per-crate supplemental
1005
+ notices, and the compiler and static runtime notices. Both ship inside the npm
1006
+ package; keep them beside any separately distributed copy of a `mailer-bin`
1007
+ executable. `notices/inventory.json` pins every notice file and notice input by
1008
+ SHA-256 together with the locked package list, the rustc that built the
1009
+ executables and the exact Ubuntu glibc and libgcc revisions linked into them.
1010
+ There is no toolchain pin: `tsrust` builds with the system `cargo`/`rustc` when
1011
+ one is installed (rustc 1.95.0 for the current binaries) and with its bundled
1012
+ `stable-<host-triple>` otherwise, so `test/test.notices.node.ts` verifies the
1013
+ recorded versions against the compiler in use and against the versions embedded
1014
+ in `dist_rust/`, and fails when a locked crate is missing from the inventory, a
1015
+ notice file is absent or stale, a generic copyright placeholder appears, or the
1016
+ toolchain moves. Regenerate the notices after any change to the Cargo graph,
1017
+ the compiler or the C toolchain; the commands are in the notice index.
1018
+
951
1019
  ## License and Legal Information
952
1020
 
953
- This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file.
1021
+ This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file. That license covers SmartMTA's own code; the third-party works compiled into the shipped Rust executables keep their own terms, reproduced under [third-party-notices.md](./third-party-notices.md).
954
1022
 
955
1023
  **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
956
1024