@mavogel/awscdk-rootmail 0.1.4 → 0.1.6
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/.jsii +3 -3
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/checksums/package.json +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +3 -3
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +38 -15
- package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +7 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +28 -14
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +4 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +4 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +15 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +186 -49
- package/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +43 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/schemas/schemas_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +8 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +23 -7
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +14 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/schemas/schemas_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/package.json +6 -6
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +3 -3
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@zone-eu/mailsplit/package.json +3 -3
- package/node_modules/encoding-japanese/LICENSE +25 -1
- package/node_modules/encoding-japanese/README.md +86 -51
- package/node_modules/encoding-japanese/encoding.js +107 -78
- package/node_modules/encoding-japanese/encoding.min.js +2 -2
- package/node_modules/encoding-japanese/index.d.ts +102 -0
- package/node_modules/encoding-japanese/package.json +26 -17
- package/node_modules/encoding-japanese/src/encoding-convert.js +67 -58
- package/node_modules/encoding-japanese/src/encoding-table.js +1 -0
- package/node_modules/encoding-japanese/src/index.js +1 -1
- package/node_modules/encoding-japanese/src/kana-case-table.js +1 -1
- package/node_modules/encoding-japanese/src/utf8-to-jis-alias-table.js +14 -0
- package/node_modules/encoding-japanese/src/utf8-to-jis-table.js +6 -5
- package/node_modules/encoding-japanese/src/utf8-to-jisx0212-table.js +7 -5
- package/node_modules/libmime/CHANGELOG.md +7 -0
- package/node_modules/libmime/package.json +2 -2
- package/node_modules/mailparser/.release-please-manifest.json +1 -1
- package/node_modules/mailparser/CHANGELOG.md +42 -0
- package/node_modules/mailparser/package.json +5 -5
- package/node_modules/nodemailer/CHANGELOG.md +83 -0
- package/node_modules/nodemailer/dist/cjs/addressparser/index.d.ts +1 -3
- package/node_modules/nodemailer/dist/cjs/addressparser/index.js +176 -13
- package/node_modules/nodemailer/dist/cjs/base64/index.d.ts +2 -6
- package/node_modules/nodemailer/dist/cjs/base64/index.js +2 -0
- package/node_modules/nodemailer/dist/cjs/dkim/index.d.ts +4 -4
- package/node_modules/nodemailer/dist/cjs/dkim/message-parser.d.ts +1 -3
- package/node_modules/nodemailer/dist/cjs/dkim/message-parser.js +14 -5
- package/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.d.ts +3 -22
- package/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.js +5 -0
- package/node_modules/nodemailer/dist/cjs/dkim/sign.d.ts +5 -5
- package/node_modules/nodemailer/dist/cjs/errors.d.ts +8 -8
- package/node_modules/nodemailer/dist/cjs/fetch/cookies.d.ts +12 -10
- package/node_modules/nodemailer/dist/cjs/fetch/cookies.js +28 -14
- package/node_modules/nodemailer/dist/cjs/fetch/index.d.ts +15 -15
- package/node_modules/nodemailer/dist/cjs/json-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/cjs/mail-composer/index.d.ts +49 -104
- package/node_modules/nodemailer/dist/cjs/mail-composer/index.js +14 -3
- package/node_modules/nodemailer/dist/cjs/mailer/index.d.ts +21 -28
- package/node_modules/nodemailer/dist/cjs/mailer/index.js +19 -5
- package/node_modules/nodemailer/dist/cjs/mailer/mail-message.d.ts +8 -12
- package/node_modules/nodemailer/dist/cjs/mailer/mail-message.js +4 -1
- package/node_modules/nodemailer/dist/cjs/mime-funcs/index.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/mime-funcs/index.js +4 -1
- package/node_modules/nodemailer/dist/cjs/mime-node/index.d.ts +37 -191
- package/node_modules/nodemailer/dist/cjs/mime-node/index.js +82 -12
- package/node_modules/nodemailer/dist/cjs/mime-node/last-newline.d.ts +1 -3
- package/node_modules/nodemailer/dist/cjs/mime-node/last-newline.js +2 -0
- package/node_modules/nodemailer/dist/cjs/mime-node/le-unix.d.ts +1 -5
- package/node_modules/nodemailer/dist/cjs/mime-node/le-unix.js +1 -0
- package/node_modules/nodemailer/dist/cjs/mime-node/le-windows.d.ts +1 -5
- package/node_modules/nodemailer/dist/cjs/mime-node/le-windows.js +1 -0
- package/node_modules/nodemailer/dist/cjs/nodemailer.d.ts +2 -2
- package/node_modules/nodemailer/dist/cjs/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/package-info.js +1 -1
- package/node_modules/nodemailer/dist/cjs/qp/index.d.ts +2 -5
- package/node_modules/nodemailer/dist/cjs/qp/index.js +2 -0
- package/node_modules/nodemailer/dist/cjs/sendmail-transport/index.d.ts +4 -6
- package/node_modules/nodemailer/dist/cjs/ses-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/cjs/ses-transport/index.js +5 -1
- package/node_modules/nodemailer/dist/cjs/shared/index.d.ts +31 -37
- package/node_modules/nodemailer/dist/cjs/shared/index.js +19 -7
- package/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.d.ts +1 -9
- package/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.js +2 -0
- package/node_modules/nodemailer/dist/cjs/smtp-connection/http-proxy-client.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/smtp-connection/index.d.ts +65 -403
- package/node_modules/nodemailer/dist/cjs/smtp-connection/index.js +99 -19
- package/node_modules/nodemailer/dist/cjs/smtp-pool/index.d.ts +8 -46
- package/node_modules/nodemailer/dist/cjs/smtp-pool/index.js +13 -2
- package/node_modules/nodemailer/dist/cjs/smtp-pool/pool-resource.d.ts +2 -4
- package/node_modules/nodemailer/dist/cjs/smtp-transport/index.d.ts +16 -16
- package/node_modules/nodemailer/dist/cjs/stream-transport/index.d.ts +3 -3
- package/node_modules/nodemailer/dist/cjs/well-known/index.d.ts +9 -9
- package/node_modules/nodemailer/dist/cjs/well-known/services.js +2 -0
- package/node_modules/nodemailer/dist/cjs/xoauth2/index.d.ts +18 -18
- package/node_modules/nodemailer/dist/esm/addressparser/index.d.ts +1 -3
- package/node_modules/nodemailer/dist/esm/addressparser/index.js +176 -13
- package/node_modules/nodemailer/dist/esm/base64/index.d.ts +2 -6
- package/node_modules/nodemailer/dist/esm/base64/index.js +2 -0
- package/node_modules/nodemailer/dist/esm/dkim/index.d.ts +4 -4
- package/node_modules/nodemailer/dist/esm/dkim/message-parser.d.ts +1 -3
- package/node_modules/nodemailer/dist/esm/dkim/message-parser.js +14 -5
- package/node_modules/nodemailer/dist/esm/dkim/relaxed-body.d.ts +3 -22
- package/node_modules/nodemailer/dist/esm/dkim/relaxed-body.js +5 -0
- package/node_modules/nodemailer/dist/esm/dkim/sign.d.ts +5 -5
- package/node_modules/nodemailer/dist/esm/errors.d.ts +8 -8
- package/node_modules/nodemailer/dist/esm/fetch/cookies.d.ts +12 -10
- package/node_modules/nodemailer/dist/esm/fetch/cookies.js +25 -14
- package/node_modules/nodemailer/dist/esm/fetch/index.d.ts +15 -15
- package/node_modules/nodemailer/dist/esm/json-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/esm/mail-composer/index.d.ts +49 -104
- package/node_modules/nodemailer/dist/esm/mail-composer/index.js +14 -3
- package/node_modules/nodemailer/dist/esm/mailer/index.d.ts +21 -28
- package/node_modules/nodemailer/dist/esm/mailer/index.js +19 -5
- package/node_modules/nodemailer/dist/esm/mailer/mail-message.d.ts +8 -12
- package/node_modules/nodemailer/dist/esm/mailer/mail-message.js +4 -1
- package/node_modules/nodemailer/dist/esm/mime-funcs/index.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/mime-funcs/index.js +4 -1
- package/node_modules/nodemailer/dist/esm/mime-node/index.d.ts +37 -191
- package/node_modules/nodemailer/dist/esm/mime-node/index.js +82 -12
- package/node_modules/nodemailer/dist/esm/mime-node/last-newline.d.ts +1 -3
- package/node_modules/nodemailer/dist/esm/mime-node/last-newline.js +2 -0
- package/node_modules/nodemailer/dist/esm/mime-node/le-unix.d.ts +1 -5
- package/node_modules/nodemailer/dist/esm/mime-node/le-unix.js +1 -0
- package/node_modules/nodemailer/dist/esm/mime-node/le-windows.d.ts +1 -5
- package/node_modules/nodemailer/dist/esm/mime-node/le-windows.js +1 -0
- package/node_modules/nodemailer/dist/esm/nodemailer.d.ts +2 -2
- package/node_modules/nodemailer/dist/esm/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/package-info.js +1 -1
- package/node_modules/nodemailer/dist/esm/qp/index.d.ts +2 -5
- package/node_modules/nodemailer/dist/esm/qp/index.js +2 -0
- package/node_modules/nodemailer/dist/esm/sendmail-transport/index.d.ts +4 -6
- package/node_modules/nodemailer/dist/esm/ses-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/esm/ses-transport/index.js +5 -1
- package/node_modules/nodemailer/dist/esm/shared/index.d.ts +31 -37
- package/node_modules/nodemailer/dist/esm/shared/index.js +19 -7
- package/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.d.ts +1 -9
- package/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.js +2 -0
- package/node_modules/nodemailer/dist/esm/smtp-connection/http-proxy-client.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/smtp-connection/index.d.ts +65 -403
- package/node_modules/nodemailer/dist/esm/smtp-connection/index.js +99 -19
- package/node_modules/nodemailer/dist/esm/smtp-pool/index.d.ts +8 -46
- package/node_modules/nodemailer/dist/esm/smtp-pool/index.js +13 -2
- package/node_modules/nodemailer/dist/esm/smtp-pool/pool-resource.d.ts +2 -4
- package/node_modules/nodemailer/dist/esm/smtp-transport/index.d.ts +16 -16
- package/node_modules/nodemailer/dist/esm/stream-transport/index.d.ts +3 -3
- package/node_modules/nodemailer/dist/esm/well-known/index.d.ts +9 -9
- package/node_modules/nodemailer/dist/esm/well-known/services.js +2 -0
- package/node_modules/nodemailer/dist/esm/xoauth2/index.d.ts +18 -18
- package/node_modules/nodemailer/dist/well-known/services.json +2 -2
- package/node_modules/nodemailer/package.json +6 -6
- package/package.json +1 -1
|
@@ -1,5 +1,88 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [10.0.10](https://github.com/nodemailer/nodemailer/compare/v10.0.9...v10.0.10) (2026-09-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* derive the attachment filename from the basename of a Windows path ([c7cc7ce](https://github.com/nodemailer/nodemailer/commit/c7cc7ce41a3602441747476a2a2c4a8ff466a83e))
|
|
9
|
+
* **dkim:** unfold folded header lines in linear time ([28a5909](https://github.com/nodemailer/nodemailer/commit/28a5909cec27646cb001dc7e97a8f5d26c973078))
|
|
10
|
+
* **smtp-connection:** reassemble multiline replies in linear time ([f2d82fa](https://github.com/nodemailer/nodemailer/commit/f2d82fa84d47015a7bbb4253da61eeb778c658b1))
|
|
11
|
+
|
|
12
|
+
## [10.0.9](https://github.com/nodemailer/nodemailer/compare/v10.0.8...v10.0.9) (2026-09-12)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **addressparser:** bound the '@' probe to the run being scanned ([1465c3f](https://github.com/nodemailer/nodemailer/commit/1465c3f5ff74a7c4fbbe9853bd01448bb92bf5b7))
|
|
18
|
+
* **addressparser:** keep the text after a comment out of a quoted local part address ([2f36eb1](https://github.com/nodemailer/nodemailer/commit/2f36eb1aa1dd33e312411dc9b888548e14db54ee))
|
|
19
|
+
|
|
20
|
+
## [10.0.8](https://github.com/nodemailer/nodemailer/compare/v10.0.7...v10.0.8) (2026-09-11)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **mime-node:** clean the boundary where it is written, not only where it is built ([e14278d](https://github.com/nodemailer/nodemailer/commit/e14278d2dae9427280c79450605a27b1c5d2c355))
|
|
26
|
+
* **mime-node:** drop every control character from multipart boundary material ([a82a355](https://github.com/nodemailer/nodemailer/commit/a82a35554848a2e07485ff81f80aefe2736e5a04))
|
|
27
|
+
|
|
28
|
+
## [10.0.7](https://github.com/nodemailer/nodemailer/compare/v10.0.6...v10.0.7) (2026-09-11)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **mime-funcs:** do not double encode Buffer input when chunking base64 mime words ([#1865](https://github.com/nodemailer/nodemailer/issues/1865)) ([4327a59](https://github.com/nodemailer/nodemailer/commit/4327a59939748a7f9394b0a029495fd476f68f30))
|
|
34
|
+
* **mime-node:** keep a boundary that is only line breaks from stripping to empty ([ec46800](https://github.com/nodemailer/nodemailer/commit/ec46800cdcab734d9aa79e1278e819962b3b8f09))
|
|
35
|
+
* **mime-node:** strip line breaks from multipart boundary material ([#1867](https://github.com/nodemailer/nodemailer/issues/1867)) ([03c1a5c](https://github.com/nodemailer/nodemailer/commit/03c1a5c48b6828d9392983d8718fdb1fd583a06c))
|
|
36
|
+
* **smtp-pool:** release rate-limited connections on close ([#1866](https://github.com/nodemailer/nodemailer/issues/1866)) ([7f5c7a4](https://github.com/nodemailer/nodemailer/commit/7f5c7a46b61da9f5c5feaffd921c55b9d5892ee5))
|
|
37
|
+
|
|
38
|
+
## [10.0.6](https://github.com/nodemailer/nodemailer/compare/v10.0.5...v10.0.6) (2026-09-11)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **addressparser:** scan free text for an address in linear time ([437d7fc](https://github.com/nodemailer/nodemailer/commit/437d7fc47403df176bc39271641541b7a9bce102))
|
|
44
|
+
|
|
45
|
+
## [10.0.5](https://github.com/nodemailer/nodemailer/compare/v10.0.4...v10.0.5) (2026-09-11)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* **addressparser:** parse comment-joined addresses in linear time ([c07f175](https://github.com/nodemailer/nodemailer/commit/c07f17518d25aca8ab2ad66968dcbca538c24b89))
|
|
51
|
+
|
|
52
|
+
## [10.0.4](https://github.com/nodemailer/nodemailer/compare/v10.0.3...v10.0.4) (2026-09-11)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* **fetch:** scope a cookie without a Path to the RFC 6265 default path ([2f907cb](https://github.com/nodemailer/nodemailer/commit/2f907cb71396860d0b2534dc72c3d252ef16339d))
|
|
58
|
+
* **fetch:** send cookies set with Path back to the exact path ([#1861](https://github.com/nodemailer/nodemailer/issues/1861)) ([d557113](https://github.com/nodemailer/nodemailer/commit/d5571139750de47abbac73a3b07ae90ff39a7bdd))
|
|
59
|
+
* **mail-composer:** keep httpHeaders and tls for href alternatives and icalEvent ([#1862](https://github.com/nodemailer/nodemailer/issues/1862)) ([7f502be](https://github.com/nodemailer/nodemailer/commit/7f502bee4a6b0386099c66c0a35d92850ec462f7))
|
|
60
|
+
* resolve well-known services by their primary domains ([#1859](https://github.com/nodemailer/nodemailer/issues/1859)) ([085f525](https://github.com/nodemailer/nodemailer/commit/085f525e6b292f0ca32ab1b20d4a4ee82fc40e2d))
|
|
61
|
+
* **ses-transport:** throw a configuration error when the SES client is missing ([#1863](https://github.com/nodemailer/nodemailer/issues/1863)) ([4d9c4c9](https://github.com/nodemailer/nodemailer/commit/4d9c4c966aaca61ff6d7649a1ac0aa0ceac6ef1e))
|
|
62
|
+
|
|
63
|
+
## [10.0.3](https://github.com/nodemailer/nodemailer/compare/v10.0.2...v10.0.3) (2026-09-10)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Bug Fixes
|
|
67
|
+
|
|
68
|
+
* **fetch:** honor the cookie Domain attribute without accepting public suffixes ([1608391](https://github.com/nodemailer/nodemailer/commit/1608391ff4ccd5422a88e4cf760b26068aad6d39)), closes [#1856](https://github.com/nodemailer/nodemailer/issues/1856)
|
|
69
|
+
|
|
70
|
+
## [10.0.2](https://github.com/nodemailer/nodemailer/compare/v10.0.1...v10.0.2) (2026-09-09)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
* **mime-node:** flatten nested recipient arrays without recursion ([ebe0849](https://github.com/nodemailer/nodemailer/commit/ebe084940aef88278afc6016b78c6d1c3821bb66))
|
|
76
|
+
* **shared:** keep the TLS server name out of the DNS cache ([a6512db](https://github.com/nodemailer/nodemailer/commit/a6512dbcb3c6e7f2f70d3acccc5752defe3c61fe))
|
|
77
|
+
|
|
78
|
+
## [10.0.1](https://github.com/nodemailer/nodemailer/compare/v10.0.0...v10.0.1) (2026-09-07)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Bug Fixes
|
|
82
|
+
|
|
83
|
+
* **types:** accept an explicit undefined for optional properties ([209719d](https://github.com/nodemailer/nodemailer/commit/209719dd6a192656a6b18de265a3b4ac387208ff)), closes [#1853](https://github.com/nodemailer/nodemailer/issues/1853)
|
|
84
|
+
* **types:** drop the internal members from the published declarations ([81e64ea](https://github.com/nodemailer/nodemailer/commit/81e64eaee70aabf867afef88d3733556c9fcc1cc))
|
|
85
|
+
|
|
3
86
|
## [10.0.0](https://github.com/nodemailer/nodemailer/compare/v9.1.1...v10.0.0) (2026-09-03)
|
|
4
87
|
|
|
5
88
|
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface AddressParserOptions {
|
|
5
5
|
/** Flatten groups into a single list of mailboxes */
|
|
6
|
-
flatten?: boolean;
|
|
7
|
-
/** Internal recursion depth counter (do not set manually) */
|
|
8
|
-
_depth?: number;
|
|
6
|
+
flatten?: boolean | undefined;
|
|
9
7
|
}
|
|
10
8
|
/**
|
|
11
9
|
* A single mailbox. Either value may be an empty string when the input did not carry it
|
|
@@ -50,6 +50,134 @@ const ADDR_SPEC = /^[^@\s]+@[^@\s]+$/;
|
|
|
50
50
|
* further '@' that a domain should not have but malformed headers carry anyway.
|
|
51
51
|
*/
|
|
52
52
|
const LOOSE_ADDR_SPEC = /^[^@\s]+@\S+$/;
|
|
53
|
+
/**
|
|
54
|
+
* An addr-spec sitting inside free text, together with the whitespace around it. Sticky
|
|
55
|
+
* on purpose: it is run at the one offset _looseAddressStart picks rather than being let
|
|
56
|
+
* loose to search, see there.
|
|
57
|
+
*/
|
|
58
|
+
const LOOSE_TEXT_ADDR = /\s*\b[^@\s]+@[^\s]+\b\s*/y;
|
|
59
|
+
/**
|
|
60
|
+
* The characters JS `\s` matches, which the scan below has to agree with to land on the
|
|
61
|
+
* same match the pattern would.
|
|
62
|
+
*/
|
|
63
|
+
function _isSpaceCode(code) {
|
|
64
|
+
return (code === 0x20 ||
|
|
65
|
+
(code >= 0x09 && code <= 0x0d) ||
|
|
66
|
+
code === 0xa0 ||
|
|
67
|
+
code === 0x1680 ||
|
|
68
|
+
(code >= 0x2000 && code <= 0x200a) ||
|
|
69
|
+
code === 0x2028 ||
|
|
70
|
+
code === 0x2029 ||
|
|
71
|
+
code === 0x202f ||
|
|
72
|
+
code === 0x205f ||
|
|
73
|
+
code === 0x3000 ||
|
|
74
|
+
code === 0xfeff);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The characters JS `\w` matches without the unicode flag, the set the `\b` in
|
|
78
|
+
* LOOSE_TEXT_ADDR is read against. charCodeAt off either end of the string gives NaN,
|
|
79
|
+
* which compares false throughout, so out of range reads as the non-word the pattern
|
|
80
|
+
* treats them as.
|
|
81
|
+
*/
|
|
82
|
+
function _isWordCode(code) {
|
|
83
|
+
return (code >= 0x30 && code <= 0x39) || (code >= 0x41 && code <= 0x5a) || (code >= 0x61 && code <= 0x7a) || code === 0x5f;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Whether `\b` holds at an offset
|
|
87
|
+
*/
|
|
88
|
+
function _isBoundary(text, at) {
|
|
89
|
+
return _isWordCode(text.charCodeAt(at - 1)) !== _isWordCode(text.charCodeAt(at));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Offset of the first '@' in `text` between `from` and `to`, or -1 when the range holds none.
|
|
93
|
+
*
|
|
94
|
+
* indexOf would scan on to the end of the value, and the value here is a whole header. The
|
|
95
|
+
* walk below steps one whitespace delimited run at a time and only ever uses a '@' that sits
|
|
96
|
+
* inside the run it is on, so an unbounded probe rescans everything behind that run once per
|
|
97
|
+
* run and grows with the square of the header: 400KB of free text carrying no '@' took a
|
|
98
|
+
* quarter of a second. GHSA-v53p-9fqp-m79j took the pattern search out of this walk and left
|
|
99
|
+
* the probe unbounded behind it.
|
|
100
|
+
*
|
|
101
|
+
* @param text Text to look in
|
|
102
|
+
* @param from Offset to start at
|
|
103
|
+
* @param to Offset to stop before
|
|
104
|
+
* @return Offset of the '@', or -1
|
|
105
|
+
*/
|
|
106
|
+
function _indexOfAt(text, from, to) {
|
|
107
|
+
for (let i = from; i < to; i++) {
|
|
108
|
+
if (text.charCodeAt(i) === 0x40) {
|
|
109
|
+
return i;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return -1;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Finds the offset LOOSE_TEXT_ADDR matches at, or -1 when it does not match at all.
|
|
116
|
+
*
|
|
117
|
+
* Letting the pattern search for itself is quadratic: '[^@\s]+' is retried from every
|
|
118
|
+
* offset and rescans the run to the next '@' each time, so 140KB of header holding no
|
|
119
|
+
* usable '@' blocks the event loop for about ten seconds (GHSA-v53p-9fqp-m79j). The search is also unnecessary.
|
|
120
|
+
* '[^@\s]+' crosses neither whitespace nor a '@', so a match can only begin at the head of
|
|
121
|
+
* a whitespace delimited run or just past a '@' inside one, and '[^\s]+\b' gives characters
|
|
122
|
+
* back until it lands on a boundary, so the only end it can take in that run is the last
|
|
123
|
+
* boundary in it. Both are found in one pass, and the pattern is then run at that single
|
|
124
|
+
* offset.
|
|
125
|
+
*
|
|
126
|
+
* @param text Free text to look in
|
|
127
|
+
* @return Offset to match at, or -1
|
|
128
|
+
*/
|
|
129
|
+
function _looseAddressStart(text) {
|
|
130
|
+
const len = text.length;
|
|
131
|
+
let pos = 0;
|
|
132
|
+
while (pos < len) {
|
|
133
|
+
while (pos < len && _isSpaceCode(text.charCodeAt(pos))) {
|
|
134
|
+
pos++;
|
|
135
|
+
}
|
|
136
|
+
if (pos >= len) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
const runStart = pos;
|
|
140
|
+
let runEnd = pos;
|
|
141
|
+
while (runEnd < len && !_isSpaceCode(text.charCodeAt(runEnd))) {
|
|
142
|
+
runEnd++;
|
|
143
|
+
}
|
|
144
|
+
let at = _indexOfAt(text, runStart, runEnd);
|
|
145
|
+
if (at >= 0) {
|
|
146
|
+
let lastBoundary = -1;
|
|
147
|
+
for (let k = runEnd; k > runStart; k--) {
|
|
148
|
+
if (_isBoundary(text, k)) {
|
|
149
|
+
lastBoundary = k;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
let atomStart = runStart;
|
|
154
|
+
while (lastBoundary >= 0 && at >= 0) {
|
|
155
|
+
// '[^@\s]+' has to cover a character before the '@' and '[^\s]+' one after it,
|
|
156
|
+
// and the boundary that ends the match has to sit past both
|
|
157
|
+
if (at > atomStart && runEnd > at + 1 && lastBoundary > at + 1) {
|
|
158
|
+
for (let start = atomStart; start < at; start++) {
|
|
159
|
+
if (_isBoundary(text, start)) {
|
|
160
|
+
if (start > runStart) {
|
|
161
|
+
return start;
|
|
162
|
+
}
|
|
163
|
+
// the leading '\s*' is greedy, so a match that begins at the run
|
|
164
|
+
// takes the whitespace in front of it along
|
|
165
|
+
let padded = runStart;
|
|
166
|
+
while (padded > 0 && _isSpaceCode(text.charCodeAt(padded - 1))) {
|
|
167
|
+
padded--;
|
|
168
|
+
}
|
|
169
|
+
return padded;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
atomStart = at + 1;
|
|
174
|
+
at = _indexOfAt(text, atomStart, runEnd);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
pos = runEnd;
|
|
178
|
+
}
|
|
179
|
+
return -1;
|
|
180
|
+
}
|
|
53
181
|
/**
|
|
54
182
|
* Recovers the addr-spec from an angle-addr that came back holding unquoted whitespace.
|
|
55
183
|
*
|
|
@@ -134,6 +262,12 @@ function _handleAddress(tokens, depth) {
|
|
|
134
262
|
textWasQuoted: []
|
|
135
263
|
};
|
|
136
264
|
let insideQuotes = false;
|
|
265
|
+
// Last character of the run each state is currently accumulating. Reading it back off
|
|
266
|
+
// the accumulator with slice(-1) makes the engine flatten the whole growing string on
|
|
267
|
+
// every token, which is quadratic over an address built from many comment-joined atoms
|
|
268
|
+
// (GHSA-prgh-xp8r-p3m5). A run only ever grows by the token appended below, so the
|
|
269
|
+
// character is carried along instead of re-read.
|
|
270
|
+
const lastChars = { address: '', comment: '', group: '', text: '' };
|
|
137
271
|
// Filter out <addresses>, (comments) and regular text
|
|
138
272
|
for (let i = 0, len = tokens.length; i < len; i++) {
|
|
139
273
|
const token = tokens[i];
|
|
@@ -164,6 +298,19 @@ function _handleAddress(tokens, depth) {
|
|
|
164
298
|
}
|
|
165
299
|
}
|
|
166
300
|
else if (token.value) {
|
|
301
|
+
// An empty quoted string is dropped by the tokenizer, leaving no text token of its
|
|
302
|
+
// own for textWasQuoted to be recorded on, so the pair of quote operators right in
|
|
303
|
+
// front of this token is all that is left of it and the run it opens carries the
|
|
304
|
+
// quoting instead. Without this '""@example.com' reads as the bare '@example.com',
|
|
305
|
+
// the quotes never go back on, and the value is no longer an addr-spec a trailing
|
|
306
|
+
// comment can be peeled off of. It only ever opens a run: a run that already holds
|
|
307
|
+
// material collected outside the quotes is not a quoted string, whatever follows it
|
|
308
|
+
const prevPrevToken = i > 1 ? tokens[i - 2] : null;
|
|
309
|
+
const opensAfterEmptyQuotedString = prevToken?.type === 'operator' &&
|
|
310
|
+
prevToken.value === '"' &&
|
|
311
|
+
!!prevToken.noBreak &&
|
|
312
|
+
prevPrevToken?.type === 'operator' &&
|
|
313
|
+
prevPrevToken.value === '"';
|
|
167
314
|
if (state === 'address') {
|
|
168
315
|
// Handle unquoted name that includes a "<".
|
|
169
316
|
// Apple Mail truncates everything between an unexpected < and an address.
|
|
@@ -177,17 +324,21 @@ function _handleAddress(tokens, depth) {
|
|
|
177
324
|
const joins = prevToken &&
|
|
178
325
|
prevToken.noBreak &&
|
|
179
326
|
parts.length &&
|
|
180
|
-
(prevToken.value !== ')' ||
|
|
327
|
+
(prevToken.value !== ')' || lastChars[state] === '@' || token.value.charAt(0) === '@');
|
|
181
328
|
if (joins) {
|
|
182
329
|
data[state][data[state].length - 1] += token.value;
|
|
330
|
+
if (token.value) {
|
|
331
|
+
lastChars[state] = token.value.charAt(token.value.length - 1);
|
|
332
|
+
}
|
|
183
333
|
if (state === 'text' && insideQuotes) {
|
|
184
334
|
data.textWasQuoted[data.textWasQuoted.length - 1] = true;
|
|
185
335
|
}
|
|
186
336
|
}
|
|
187
337
|
else {
|
|
188
338
|
data[state].push(token.value);
|
|
339
|
+
lastChars[state] = token.value.charAt(token.value.length - 1);
|
|
189
340
|
if (state === 'text') {
|
|
190
|
-
data.textWasQuoted.push(insideQuotes);
|
|
341
|
+
data.textWasQuoted.push(insideQuotes || opensAfterEmptyQuotedString);
|
|
191
342
|
}
|
|
192
343
|
}
|
|
193
344
|
}
|
|
@@ -237,16 +388,19 @@ function _handleAddress(tokens, depth) {
|
|
|
237
388
|
for (let i = data.text.length - 1; i >= 0; i--) {
|
|
238
389
|
// Security: Do not extract email addresses from quoted strings
|
|
239
390
|
if (!data.textWasQuoted[i]) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
391
|
+
const part = data.text[i];
|
|
392
|
+
let remainder = part;
|
|
393
|
+
const at = _looseAddressStart(part);
|
|
394
|
+
if (at >= 0) {
|
|
395
|
+
LOOSE_TEXT_ADDR.lastIndex = at;
|
|
396
|
+
const match = LOOSE_TEXT_ADDR.exec(part);
|
|
397
|
+
if (match) {
|
|
398
|
+
data.address = [match[0].trim()];
|
|
244
399
|
extracted = true;
|
|
245
|
-
|
|
400
|
+
remainder = part.slice(0, at) + ' ' + part.slice(at + match[0].length);
|
|
246
401
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
.trim();
|
|
402
|
+
}
|
|
403
|
+
data.text[i] = remainder.trim();
|
|
250
404
|
if (extracted) {
|
|
251
405
|
break;
|
|
252
406
|
}
|
|
@@ -269,6 +423,18 @@ function _handleAddress(tokens, depth) {
|
|
|
269
423
|
// Join values with spaces
|
|
270
424
|
data.text = data.text.join(' ');
|
|
271
425
|
data.address = data.address.join(' ');
|
|
426
|
+
if (addressFromQuotedText && data.text) {
|
|
427
|
+
// The mailbox is still sitting in the text, so it moves over here and is quoted
|
|
428
|
+
// before the recovery below rather than after it. Anything else the text holds
|
|
429
|
+
// came along with it: a comment ends the domain but leaves the atoms behind it in
|
|
430
|
+
// the same text, and '"user"@example.com(x)evil.com' was handed on as the address
|
|
431
|
+
// 'user@example.com evil.com', a second domain riding into the envelope recipient
|
|
432
|
+
// on a value that is no addr-spec at all (GHSA-g57g-f23g-4646). Putting the quotes
|
|
433
|
+
// back first is what lets the recovery tell the whitespace an addr-spec may carry
|
|
434
|
+
// from the wreckage trailing one, as only a quoted local part may hold whitespace
|
|
435
|
+
data.address = _quoteLocalPart(data.text);
|
|
436
|
+
data.text = '';
|
|
437
|
+
}
|
|
272
438
|
_recoverAddrSpec(data);
|
|
273
439
|
const address = {
|
|
274
440
|
address: data.address || data.text || '',
|
|
@@ -282,9 +448,6 @@ function _handleAddress(tokens, depth) {
|
|
|
282
448
|
address.address = '';
|
|
283
449
|
}
|
|
284
450
|
}
|
|
285
|
-
if (addressFromQuotedText && address.address) {
|
|
286
|
-
address.address = _quoteLocalPart(address.address);
|
|
287
|
-
}
|
|
288
451
|
addresses.push(address);
|
|
289
452
|
}
|
|
290
453
|
return addresses;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transform
|
|
1
|
+
import { Transform } from 'node:stream';
|
|
2
2
|
/**
|
|
3
3
|
* Encodes a Buffer into a base64 encoded string
|
|
4
4
|
*
|
|
@@ -19,7 +19,7 @@ export declare function wrap(str: string, lineLength?: number | false): string;
|
|
|
19
19
|
*/
|
|
20
20
|
export interface EncoderOptions {
|
|
21
21
|
/** Maximum length for lines, set to false to disable wrapping */
|
|
22
|
-
lineLength?: number | false;
|
|
22
|
+
lineLength?: number | false | undefined;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Creates a transform stream for encoding data to base64 encoding
|
|
@@ -32,9 +32,5 @@ export declare class Encoder extends Transform {
|
|
|
32
32
|
options: EncoderOptions;
|
|
33
33
|
inputBytes: number;
|
|
34
34
|
outputBytes: number;
|
|
35
|
-
_curLine: string;
|
|
36
|
-
_remainingBytes: Buffer | false;
|
|
37
35
|
constructor(options?: EncoderOptions);
|
|
38
|
-
_transform(chunk: Buffer | string, encoding: BufferEncoding | 'buffer', done: TransformCallback): void;
|
|
39
|
-
_flush(done: TransformCallback): void;
|
|
40
36
|
}
|
|
@@ -59,6 +59,7 @@ class Encoder extends node_stream_1.Transform {
|
|
|
59
59
|
this.inputBytes = 0;
|
|
60
60
|
this.outputBytes = 0;
|
|
61
61
|
}
|
|
62
|
+
/** @internal */
|
|
62
63
|
_transform(chunk, encoding, done) {
|
|
63
64
|
let buf = encoding !== 'buffer' ? Buffer.from(chunk, encoding) : chunk;
|
|
64
65
|
if (!buf || !buf.length) {
|
|
@@ -100,6 +101,7 @@ class Encoder extends node_stream_1.Transform {
|
|
|
100
101
|
}
|
|
101
102
|
setImmediate(done);
|
|
102
103
|
}
|
|
104
|
+
/** @internal */
|
|
103
105
|
_flush(done) {
|
|
104
106
|
if (this._remainingBytes && this._remainingBytes.length) {
|
|
105
107
|
this._curLine += encode(this._remainingBytes);
|
|
@@ -9,13 +9,13 @@ export type { DKIMKey, DKIMPrivateKey, DKIMSignOptions };
|
|
|
9
9
|
*/
|
|
10
10
|
export interface DKIMOptions extends DKIMSignOptions {
|
|
11
11
|
/** One or more signing keys, used instead of the domainName, keySelector and privateKey options */
|
|
12
|
-
keys?: DKIMKey | DKIMKey[];
|
|
12
|
+
keys?: DKIMKey | DKIMKey[] | undefined;
|
|
13
13
|
/** Directory for buffering large message bodies to disk, no buffering when not set */
|
|
14
|
-
cacheDir?: string | false;
|
|
14
|
+
cacheDir?: string | false | undefined;
|
|
15
15
|
/** Body size in bytes from which the body is buffered to cacheDir, defaults to 10 MB */
|
|
16
|
-
cacheTreshold?: number;
|
|
16
|
+
cacheTreshold?: number | undefined;
|
|
17
17
|
/** Hash algorithm for the body hash and the signature, defaults to sha256 */
|
|
18
|
-
hashAlgo?: string;
|
|
18
|
+
hashAlgo?: string | undefined;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* The signed message as returned by DKIM#sign
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transform, type
|
|
1
|
+
import { Transform, type TransformOptions } from 'node:stream';
|
|
2
2
|
/**
|
|
3
3
|
* A header line as emitted with the 'headers' event
|
|
4
4
|
*/
|
|
@@ -35,7 +35,5 @@ export default class MessageParser extends Transform {
|
|
|
35
35
|
* @return Returns true if headers are already found or false otherwise
|
|
36
36
|
*/
|
|
37
37
|
checkHeaders(data: Buffer): boolean;
|
|
38
|
-
_transform(chunk: Buffer | string, encoding: BufferEncoding, callback: TransformCallback): void;
|
|
39
|
-
_flush(callback: TransformCallback): void;
|
|
40
38
|
parseHeaders(): MessageParserHeaderLine[];
|
|
41
39
|
}
|
|
@@ -90,6 +90,7 @@ class MessageParser extends node_stream_1.Transform {
|
|
|
90
90
|
this.updateLastBytes(data);
|
|
91
91
|
return false;
|
|
92
92
|
}
|
|
93
|
+
/** @internal */
|
|
93
94
|
_transform(chunk, encoding, callback) {
|
|
94
95
|
if (!chunk || !chunk.length) {
|
|
95
96
|
return callback();
|
|
@@ -110,6 +111,7 @@ class MessageParser extends node_stream_1.Transform {
|
|
|
110
111
|
}
|
|
111
112
|
setImmediate(callback);
|
|
112
113
|
}
|
|
114
|
+
/** @internal */
|
|
113
115
|
_flush(callback) {
|
|
114
116
|
if (this.headerChunks) {
|
|
115
117
|
// no empty line was seen, so the message consists of headers only
|
|
@@ -124,11 +126,18 @@ class MessageParser extends node_stream_1.Transform {
|
|
|
124
126
|
// signature covers exactly the bytes the receiving side canonicalizes
|
|
125
127
|
// Only SP and HTAB fold a line, and only they are trimmed from the field name, the
|
|
126
128
|
// same whitespace the relaxed canonicalization in sign.ts works with
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
const rawLines = (this.rawHeaders || Buffer.alloc(0)).toString('binary').split(/\r?\n/);
|
|
130
|
+
// Unfold in a single forward pass and only ever test a freshly split line for the
|
|
131
|
+
// continuation prefix. Testing an already merged line instead would rescan a string
|
|
132
|
+
// that grows with every continuation line, so a header folded into many continuation
|
|
133
|
+
// lines (a large recipient list, for example) would take quadratic time to unfold
|
|
134
|
+
const lines = [];
|
|
135
|
+
for (const rawLine of rawLines) {
|
|
136
|
+
if (lines.length && /^[ \t]/.test(rawLine)) {
|
|
137
|
+
lines[lines.length - 1] += '\n' + rawLine;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
lines.push(rawLine);
|
|
132
141
|
}
|
|
133
142
|
}
|
|
134
143
|
return lines
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Transform
|
|
1
|
+
import { Transform } from 'node:stream';
|
|
2
2
|
import crypto from 'node:crypto';
|
|
3
3
|
/**
|
|
4
4
|
* Options for the relaxed body hash stream
|
|
5
5
|
*/
|
|
6
6
|
export interface RelaxedBodyOptions {
|
|
7
7
|
/** Hash algorithm for the body hash, defaults to sha256 */
|
|
8
|
-
hashAlgo?: string;
|
|
8
|
+
hashAlgo?: string | undefined;
|
|
9
9
|
/** Collect the canonicalized body and emit it with the 'hash' event */
|
|
10
|
-
debug?: boolean;
|
|
10
|
+
debug?: boolean | undefined;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Passes the message body through unchanged and hashes its relaxed
|
|
@@ -22,25 +22,6 @@ export default class RelaxedBody extends Transform {
|
|
|
22
22
|
/** Bytes of the original body seen so far */
|
|
23
23
|
byteLength: number;
|
|
24
24
|
debug: boolean | undefined;
|
|
25
|
-
_debugBody: Buffer[] | false;
|
|
26
|
-
/** The current line has bytes that survive canonicalization */
|
|
27
|
-
_lineHasContent: boolean;
|
|
28
|
-
/** Whitespace that ends up as a single space if more content follows on the line */
|
|
29
|
-
_pendingWsp: boolean;
|
|
30
|
-
/** A CR that is part of the line ending if LF follows, otherwise content */
|
|
31
|
-
_pendingCr: boolean;
|
|
32
|
-
/** Empty lines that are hashed only once a non-empty line follows them */
|
|
33
|
-
_pendingEmptyLines: number;
|
|
34
25
|
constructor(options?: RelaxedBodyOptions);
|
|
35
|
-
_hashCanonical(data: Buffer): void;
|
|
36
|
-
_hashEmptyLines(): void;
|
|
37
|
-
/**
|
|
38
|
-
* Writes a content byte, with the space a pending run of whitespace collapses to,
|
|
39
|
-
* into the output buffer and returns the new write position. Kept a method rather
|
|
40
|
-
* than a closure so the write position stays a plain local in the byte loop
|
|
41
|
-
*/
|
|
42
|
-
_emitContent(out: Buffer, outPos: number, c: number): number;
|
|
43
26
|
updateHash(chunk: Buffer, final?: boolean): void;
|
|
44
|
-
_transform(chunk: Buffer | string, encoding: BufferEncoding, callback: TransformCallback): void;
|
|
45
|
-
_flush(callback: TransformCallback): void;
|
|
46
27
|
}
|
|
@@ -34,6 +34,7 @@ class RelaxedBody extends node_stream_1.Transform {
|
|
|
34
34
|
this._pendingCr = false;
|
|
35
35
|
this._pendingEmptyLines = 0;
|
|
36
36
|
}
|
|
37
|
+
/** @internal */
|
|
37
38
|
_hashCanonical(data) {
|
|
38
39
|
if (!data.length) {
|
|
39
40
|
return;
|
|
@@ -43,6 +44,7 @@ class RelaxedBody extends node_stream_1.Transform {
|
|
|
43
44
|
this._debugBody.push(Buffer.from(data));
|
|
44
45
|
}
|
|
45
46
|
}
|
|
47
|
+
/** @internal */
|
|
46
48
|
_hashEmptyLines() {
|
|
47
49
|
while (this._pendingEmptyLines > 0) {
|
|
48
50
|
const count = Math.min(this._pendingEmptyLines, EMPTY_LINES.length / 2);
|
|
@@ -54,6 +56,7 @@ class RelaxedBody extends node_stream_1.Transform {
|
|
|
54
56
|
* Writes a content byte, with the space a pending run of whitespace collapses to,
|
|
55
57
|
* into the output buffer and returns the new write position. Kept a method rather
|
|
56
58
|
* than a closure so the write position stays a plain local in the byte loop
|
|
59
|
+
* @internal
|
|
57
60
|
*/
|
|
58
61
|
_emitContent(out, outPos, c) {
|
|
59
62
|
if (!this._lineHasContent) {
|
|
@@ -116,6 +119,7 @@ class RelaxedBody extends node_stream_1.Transform {
|
|
|
116
119
|
}
|
|
117
120
|
this._hashCanonical(out.subarray(0, outPos));
|
|
118
121
|
}
|
|
122
|
+
/** @internal */
|
|
119
123
|
_transform(chunk, encoding, callback) {
|
|
120
124
|
if (!chunk || !chunk.length) {
|
|
121
125
|
return callback();
|
|
@@ -128,6 +132,7 @@ class RelaxedBody extends node_stream_1.Transform {
|
|
|
128
132
|
this.push(chunk);
|
|
129
133
|
callback();
|
|
130
134
|
}
|
|
135
|
+
/** @internal */
|
|
131
136
|
_flush(callback) {
|
|
132
137
|
this.updateHash(Buffer.alloc(0), true);
|
|
133
138
|
if (this._lineHasContent) {
|
|
@@ -10,17 +10,17 @@ export type DKIMPrivateKey = crypto.KeyLike | crypto.SignKeyObjectInput | crypto
|
|
|
10
10
|
*/
|
|
11
11
|
export interface DKIMKey {
|
|
12
12
|
/** Domain name to be signed for */
|
|
13
|
-
domainName?: string;
|
|
13
|
+
domainName?: string | undefined;
|
|
14
14
|
/** DKIM key selector to use */
|
|
15
|
-
keySelector?: string;
|
|
15
|
+
keySelector?: string | undefined;
|
|
16
16
|
/** DKIM private key to use */
|
|
17
|
-
privateKey?: DKIMPrivateKey;
|
|
17
|
+
privateKey?: DKIMPrivateKey | undefined;
|
|
18
18
|
}
|
|
19
19
|
export interface DKIMSignOptions extends DKIMKey {
|
|
20
20
|
/** Colon separated list of header field names to sign, defaults to the RFC4871 list */
|
|
21
|
-
headerFieldNames?: string;
|
|
21
|
+
headerFieldNames?: string | undefined;
|
|
22
22
|
/** Colon separated list of header field names to leave out of the signature */
|
|
23
|
-
skipFields?: string;
|
|
23
|
+
skipFields?: string | undefined;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Canonicalized headers and the list of field names that went into them
|
|
@@ -68,21 +68,21 @@ export declare const EFETCH = "EFETCH";
|
|
|
68
68
|
*/
|
|
69
69
|
export interface NodemailerError extends Error {
|
|
70
70
|
/** Nodemailer error code, see ERROR_CODES */
|
|
71
|
-
code?: string;
|
|
71
|
+
code?: string | undefined;
|
|
72
72
|
/** SMTP command that was in flight when the server replied with an error */
|
|
73
|
-
command?: string;
|
|
73
|
+
command?: string | undefined;
|
|
74
74
|
/** Raw SMTP server response */
|
|
75
|
-
response?: string;
|
|
75
|
+
response?: string | undefined;
|
|
76
76
|
/** Numeric SMTP response code */
|
|
77
|
-
responseCode?: number;
|
|
77
|
+
responseCode?: number | undefined;
|
|
78
78
|
/** URL of the resource that could not be fetched */
|
|
79
|
-
sourceUrl?: string;
|
|
79
|
+
sourceUrl?: string | undefined;
|
|
80
80
|
/** Recipient address the error applies to */
|
|
81
|
-
recipient?: string;
|
|
81
|
+
recipient?: string | undefined;
|
|
82
82
|
/** Recipient addresses rejected by the server */
|
|
83
|
-
rejected?: string[];
|
|
83
|
+
rejected?: string[] | undefined;
|
|
84
84
|
/** Per-recipient errors for the rejected addresses */
|
|
85
|
-
rejectedErrors?: NodemailerError[];
|
|
85
|
+
rejectedErrors?: NodemailerError[] | undefined;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* Node style callback: called with an error, or with null and the result
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface CookiesOptions {
|
|
5
5
|
/** Lifetime in seconds for cookies that do not set their own expiration (default 1800) */
|
|
6
|
-
sessionTimeout?: number | string;
|
|
6
|
+
sessionTimeout?: number | string | undefined;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* A cookie as parsed from a 'Set-Cookie:' header and kept in the jar
|
|
10
10
|
*/
|
|
11
11
|
export interface Cookie {
|
|
12
|
-
name?: string;
|
|
13
|
-
value?: string;
|
|
14
|
-
domain?: string;
|
|
15
|
-
path?: string;
|
|
16
|
-
expires?: Date;
|
|
17
|
-
secure?: boolean;
|
|
18
|
-
httponly?: boolean;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
value?: string | undefined;
|
|
14
|
+
domain?: string | undefined;
|
|
15
|
+
path?: string | undefined;
|
|
16
|
+
expires?: Date | undefined;
|
|
17
|
+
secure?: boolean | undefined;
|
|
18
|
+
httponly?: boolean | undefined;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Creates a biskviit cookie jar for managing cookie values in memory
|
|
@@ -85,10 +85,12 @@ export default class Cookies {
|
|
|
85
85
|
*/
|
|
86
86
|
isExpired(cookie: Cookie): boolean;
|
|
87
87
|
/**
|
|
88
|
-
* Returns
|
|
88
|
+
* Returns the default path for an URL path argument, the default-path of
|
|
89
|
+
* RFC 6265 section 5.1.4. A cookie that carries no Path attribute is scoped
|
|
90
|
+
* to the directory of the URL it was set from
|
|
89
91
|
*
|
|
90
92
|
* @param pathname
|
|
91
|
-
* @returns
|
|
93
|
+
* @returns Default path
|
|
92
94
|
*/
|
|
93
95
|
getPath(pathname?: string | null): string;
|
|
94
96
|
}
|