Fetch List-Unsubscribe as URLs, the form RFC 8621 gives it #62

Merged
jcoffey-dev merged 1 commits from fix/list-unsubscribe-as-urls into main 2026-10-27 06:56:38 +00:00
Owner

Found in a UI pass against Stalwart 1.0: opening any message failed with Email/get: invalidArguments - Invalid property ... List-Unsubscribe ... form: Text.

List-Unsubscribe is an RFC 2369 header, and RFC 8621 4.1.2.3 allows asText only for headers outside RFC 5322 and RFC 2369. Stalwart 0.16 answered it anyway; 1.0 refuses the whole call. header:List-Unsubscribe:asURLs returns the list the reader was extracting by regex, and gives the same result on 0.16.27 and 1.0.0.

Of the 17 header properties ihasmail names, 1.0 refuses three: this one, plus Return-Path:asText and Received:asText:all, which were only typings and never requested. Those are dropped.

Checked: typecheck, 1549 web + 257 server tests, build; on a local Stalwart 1.0 with 10,000 migrated messages, threads open, attachments list, send delivers.

Found in a UI pass against Stalwart 1.0: opening any message failed with `Email/get: invalidArguments - Invalid property ... List-Unsubscribe ... form: Text`. List-Unsubscribe is an RFC 2369 header, and RFC 8621 4.1.2.3 allows `asText` only for headers outside RFC 5322 and RFC 2369. Stalwart 0.16 answered it anyway; 1.0 refuses the whole call. `header:List-Unsubscribe:asURLs` returns the list the reader was extracting by regex, and gives the same result on 0.16.27 and 1.0.0. Of the 17 header properties ihasmail names, 1.0 refuses three: this one, plus `Return-Path:asText` and `Received:asText:all`, which were only typings and never requested. Those are dropped. Checked: typecheck, 1549 web + 257 server tests, build; on a local Stalwart 1.0 with 10,000 migrated messages, threads open, attachments list, send delivers.
jcoffey-dev added 1 commit 2026-10-27 06:35:00 +00:00
Fetch List-Unsubscribe as URLs, the form RFC 8621 gives it
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
ci / docker-build (pull_request) Skipped
ci / publish (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m45s
94ab1ffed3
List-Unsubscribe is an RFC 2369 header, and RFC 8621 4.1.2.3 allows the
Text form only for headers outside RFC 5322 and RFC 2369. Stalwart 0.16
answered it anyway; Stalwart 1.0 refuses the whole Email/get with
invalidArguments, so no message could be opened. asURLs returns the list the
reader was extracting by hand, on both versions.

Also drops the unused Return-Path and Received asText typings, which 1.0
refuses for the same reason.
jcoffey-dev merged commit e7420b3d42 into main 2026-10-27 06:56:38 +00:00
jcoffey-dev deleted branch fix/list-unsubscribe-as-urls 2026-10-27 06:56:39 +00:00
Sign in to join this conversation.