@bumail/smtp 0.10.0 → 0.11.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/dist/chunks/{index-twt5myrr.js → index-byaw0g4k.js} +55 -4
- package/dist/chunks/{index-twt5myrr.js.map → index-byaw0g4k.js.map} +5 -4
- package/dist/client/dsn.d.ts +1 -1
- package/dist/client/dsn.d.ts.map +1 -1
- package/dist/client/index.js +24 -7
- package/dist/client/index.js.map +4 -4
- package/dist/client/transaction.d.ts.map +1 -1
- package/dist/index.js +18 -14
- package/dist/index.js.map +4 -4
- package/dist/protocol/orcpt.d.ts +27 -0
- package/dist/protocol/orcpt.d.ts.map +1 -0
- package/dist/server/dsn-params.d.ts +3 -2
- package/dist/server/dsn-params.d.ts.map +1 -1
- package/dist/server/transaction.d.ts.map +1 -1
- package/docs/guide.md +31 -9
- package/docs/roadmap.md +6 -2
- package/docs/troubleshooting.md +11 -4
- package/package.json +1 -1
package/docs/troubleshooting.md
CHANGED
|
@@ -1157,7 +1157,8 @@ a token`; `orcpt.address of <address> must be a non-empty string`; `orcpt of
|
|
|
1157
1157
|
<address> is over 500 characters once encoded`.
|
|
1158
1158
|
|
|
1159
1159
|
**Why**: RFC 3461 §4.4 and §4.2 cap the parameters as sent, so a character that
|
|
1160
|
-
xtext writes as `+XX` counts three
|
|
1160
|
+
xtext writes as `+XX` counts three (for a `utf-8` `orcpt`, the unitext form:
|
|
1161
|
+
raw UTF-8 octets, `\x{HH}` = 6; for another type, the type, the `;` and the xtext form).
|
|
1161
1162
|
|
|
1162
1163
|
**Fix**: shorten the value, or give the type as letters, digits and hyphens.
|
|
1163
1164
|
|
|
@@ -1171,18 +1172,24 @@ await sendMail(message, { host, from, to, envid: 'q-1042' }); // not 'q 1042 …
|
|
|
1171
1172
|
than `FULL` or `HDRS`; `ENVID` empty, longer than 100 characters as sent,
|
|
1172
1173
|
not printable ASCII or not xtext; `NOTIFY` mixing `NEVER` with another
|
|
1173
1174
|
event, naming an event twice or an unknown one; `ORCPT` with no
|
|
1174
|
-
`addr-type;` prefix, an address that
|
|
1175
|
-
|
|
1175
|
+
`addr-type;` prefix, an address that does not decode (not xtext for
|
|
1176
|
+
`rfc822`; for `utf-8`, RFC 6533's `\x{HEX}` form, with raw UTF-8 only when
|
|
1177
|
+
the transaction used `SMTPUTF8`), or more than 500 characters as sent (RFC
|
|
1178
|
+
3461 §4.2).
|
|
1176
1179
|
|
|
1177
1180
|
**Why**: RFC 3461 §4. The server refuses the command rather than hand a
|
|
1178
1181
|
wrong value to `onData`.
|
|
1179
1182
|
|
|
1180
1183
|
**Fix**, as a client: encode the value as xtext (`+` and `=`, spaces and
|
|
1181
|
-
non-ASCII bytes as `+XX`), and send `NOTIFY=NEVER` alone.
|
|
1184
|
+
non-ASCII bytes as `+XX`), and send `NOTIFY=NEVER` alone. For
|
|
1185
|
+
`ORCPT=utf-8;` use RFC 6533 instead: `\x{E9}` for `é`, and `\x{2B}` for `+`
|
|
1186
|
+
(not `+2B`), or raw UTF-8 after `MAIL FROM … SMTPUTF8`.
|
|
1182
1187
|
|
|
1183
1188
|
```text
|
|
1184
1189
|
C: RCPT TO:<bob@example.com> NOTIFY=SUCCESS,FAILURE ORCPT=rfc822;bob+2Btag@example.com
|
|
1185
1190
|
S: 250 2.1.5 OK
|
|
1191
|
+
C: RCPT TO:<bob@example.com> ORCPT=utf-8;\x{E9}l\x{E8}ve@example.com
|
|
1192
|
+
S: 250 2.1.5 OK
|
|
1186
1193
|
```
|
|
1187
1194
|
|
|
1188
1195
|
### `501 5.5.4 … given twice`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bumail/smtp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "An SMTP server on Bun.listen — RFC 5321 with PIPELINING, SIZE, 8BITMIME, SMTPUTF8, STARTTLS and AUTH after TLS, policy hooks, and no open relay — and a client that delivers a message to a smarthost or by MX",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|