From 57fc1e5dc05fdd49c8f9f3203d7e475bc6c4c0bc Mon Sep 17 00:00:00 2001 From: Oliver Drobnik Date: Fri, 9 Oct 2026 10:03:18 +0200 Subject: [PATCH 1/3] Fetch messages whose IMAP reply lines exceed 8 KiB swift-nio-imap 0.4.0 caps a reply line it has not finished decoding at 8 KiB. The BODYSTRUCTURE of a mail with 74 attachments is longer, so every list, search and fetch that touched it failed with PayloadTooLargeError, and one such mail in the INBOX broke `post list` outright. SwiftMail (Cocoanetics/SwiftMail#253) pins swift-nio-imap to main for apple/swift-nio-imap#849 and hands IMAPClientHandler its 1 MB responseBufferLimit. A revision-pinned dependency can't be resolved by version, so Post pins SwiftMail by revision too. That swift-nio-imap declares macOS 15, which becomes Post's floor. Co-Authored-By: Claude Opus 5.5 --- Package.resolved | 17 +++-------------- Package.swift | 13 +++++++++++-- README.md | 2 +- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Package.resolved b/Package.resolved index 0469230..a512198 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "4df95539bc96e03b7eee2a67456b2458dc5f67169bc92ba36d567dd1f77f5e6a", + "originHash" : "dc13dacda684f550d9905c67ad5fa623fe7bce6b97dbad0647aa17f2a4ca5def", "pins" : [ { "identity" : "jsonfoundation", @@ -177,8 +177,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-imap", "state" : { - "revision" : "d67f1243f731457cb9f2eb0beb27eff9e533bf7b", - "version" : "0.4.0" + "revision" : "14ad3887dab9ca5aba38ee0ace18fddf40e9491f" } }, { @@ -199,15 +198,6 @@ "version" : "1.1.1" } }, - { - "identity" : "swift-se0270-range-set", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-se0270-range-set.git", - "state" : { - "revision" : "7d6d7531d40e95f4e1e26f6565265be6df228911", - "version" : "1.0.1" - } - }, { "identity" : "swift-service-lifecycle", "kind" : "remoteSourceControl", @@ -258,8 +248,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Cocoanetics/SwiftMail", "state" : { - "revision" : "1a681959579add669ae785d3d080b169156df60a", - "version" : "1.15.0" + "revision" : "c9792f963621415a23300b1dfaae0ab224893610" } }, { diff --git a/Package.swift b/Package.swift index 69aceac..a7cf751 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,8 @@ import PackageDescription let package = Package( name: "Post", platforms: [ - .macOS("14.0") + // SwiftMail's pinned swift-nio-imap declares macOS 15 (see below). + .macOS("15.0") ], products: [ .library( @@ -57,7 +58,15 @@ let package = Package( // 1.15.0 adds searchCount, which countMessages uses: it asks for COUNT, MIN // and MAX without the UID list, whose reply line for a large mailbox // exceeds swift-nio-imap's 8 KiB line limit. - .package(url: "https://github.com/Cocoanetics/SwiftMail", .upToNextMajor(from: "1.15.0")), + // Pinned by revision to Cocoanetics/SwiftMail#253, which removes that 8 KiB + // limit: it pins swift-nio-imap to main for apple/swift-nio-imap#849 and + // hands IMAPClientHandler its 1 MB responseBufferLimit. Before it, the + // BODYSTRUCTURE of a mail with 74 attachments was one reply line too long, + // so every list, search and fetch that touched the mail failed with + // PayloadTooLargeError. A revision-pinned dependency can't be resolved by + // version, so return to .upToNextMajor once swift-nio-imap tags a release + // with #849 and SwiftMail moves back to a version requirement. + .package(url: "https://github.com/Cocoanetics/SwiftMail", revision: "c9792f963621415a23300b1dfaae0ab224893610"), // 2.2.0 replaced the revision-pinned ZIPFoundation with tagged // swift-archive, so SwiftText is a normal version requirement again. // It declares swift-tools-version 6.3, which sets Post's toolchain diff --git a/README.md b/README.md index 44822bc..0f10c6d 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Combine IDLE with handler scripts to build a "mail room" that automatically sort ## Getting Started ### Requirements -- macOS 14.0+ +- macOS 15.0+ - Swift 6.3+ (Xcode 26.4+) ### Build & Run From b714f1c7d5bb4609e747418e9e3387b228ee271e Mon Sep 17 00:00:00 2001 From: Oliver Drobnik Date: Fri, 9 Oct 2026 10:46:16 +0200 Subject: [PATCH 2/3] Pin SwiftMail to main after #253 was merged Co-Authored-By: Claude Opus 5.5 --- Package.resolved | 4 ++-- Package.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Package.resolved b/Package.resolved index a512198..651a5c4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "dc13dacda684f550d9905c67ad5fa623fe7bce6b97dbad0647aa17f2a4ca5def", + "originHash" : "3d9b0f6ee85503e2da9b81ef8424af582ca2ee33dc76faf6d5c52e9c6586532b", "pins" : [ { "identity" : "jsonfoundation", @@ -248,7 +248,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Cocoanetics/SwiftMail", "state" : { - "revision" : "c9792f963621415a23300b1dfaae0ab224893610" + "revision" : "c3b7bc3a6b77509655668651c744934470fa2d86" } }, { diff --git a/Package.swift b/Package.swift index a7cf751..3bf9c8b 100644 --- a/Package.swift +++ b/Package.swift @@ -58,7 +58,7 @@ let package = Package( // 1.15.0 adds searchCount, which countMessages uses: it asks for COUNT, MIN // and MAX without the UID list, whose reply line for a large mailbox // exceeds swift-nio-imap's 8 KiB line limit. - // Pinned by revision to Cocoanetics/SwiftMail#253, which removes that 8 KiB + // Pinned by revision to SwiftMail main after #253, which removes that 8 KiB // limit: it pins swift-nio-imap to main for apple/swift-nio-imap#849 and // hands IMAPClientHandler its 1 MB responseBufferLimit. Before it, the // BODYSTRUCTURE of a mail with 74 attachments was one reply line too long, @@ -66,7 +66,7 @@ let package = Package( // PayloadTooLargeError. A revision-pinned dependency can't be resolved by // version, so return to .upToNextMajor once swift-nio-imap tags a release // with #849 and SwiftMail moves back to a version requirement. - .package(url: "https://github.com/Cocoanetics/SwiftMail", revision: "c9792f963621415a23300b1dfaae0ab224893610"), + .package(url: "https://github.com/Cocoanetics/SwiftMail", revision: "c3b7bc3a6b77509655668651c744934470fa2d86"), // 2.2.0 replaced the revision-pinned ZIPFoundation with tagged // swift-archive, so SwiftText is a normal version requirement again. // It declares swift-tools-version 6.3, which sets Post's toolchain From 5b3fef1e2fa67d3ff5ef35fac3c0e1aeabe263ad Mon Sep 17 00:00:00 2001 From: Oliver Drobnik Date: Fri, 9 Oct 2026 10:56:24 +0200 Subject: [PATCH 3/3] Adopt SwiftMail 1.16.0 and SwiftText 2.4.0 SwiftMail 1.16.0 is the merge commit Post was already pinned to, so only the comment changes. SwiftText 2.4.0 adds alert boxes for every output format and readable zip entry permissions. Co-Authored-By: Claude Opus 5.5 --- Package.resolved | 4 ++-- Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index 651a5c4..30daeca 100644 --- a/Package.resolved +++ b/Package.resolved @@ -265,8 +265,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Cocoanetics/SwiftText", "state" : { - "revision" : "f9279a17cbb139defb5d88ca15685cf3bd0a672a", - "version" : "2.3.0" + "revision" : "15e176a1910ece26c87468e151714f6253a6b385", + "version" : "2.4.0" } }, { diff --git a/Package.swift b/Package.swift index 3bf9c8b..39ed1a5 100644 --- a/Package.swift +++ b/Package.swift @@ -58,7 +58,7 @@ let package = Package( // 1.15.0 adds searchCount, which countMessages uses: it asks for COUNT, MIN // and MAX without the UID list, whose reply line for a large mailbox // exceeds swift-nio-imap's 8 KiB line limit. - // Pinned by revision to SwiftMail main after #253, which removes that 8 KiB + // Pinned by revision to SwiftMail 1.16.0 (#253), which removes that 8 KiB // limit: it pins swift-nio-imap to main for apple/swift-nio-imap#849 and // hands IMAPClientHandler its 1 MB responseBufferLimit. Before it, the // BODYSTRUCTURE of a mail with 74 attachments was one reply line too long,