Skip to content

Fetch messages whose IMAP reply lines exceed 8 KiB - #52

Merged
odrobnik merged 3 commits into
mainfrom
claude/cli-latest-releases-03931f
Oct 9, 2026
Merged

odrobnik merged 3 commits into
mainfrom
claude/cli-latest-releases-03931f

Conversation

@odrobnik

@odrobnik odrobnik commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

post list, post search and post fetch failed on the drobnik INBOX with:

Error: Tool call failed: The operation couldn’t be completed. (NIOCore.ByteToMessageDecoderError.PayloadTooLargeError error 1.)

The cause is one mail with 74 attachments. Its IMAP BODYSTRUCTURE is a single reply line longer than 8 KiB, and swift-nio-imap 0.4.0 hardcodes IMAPClientHandler's line buffer at exactly that, whatever SwiftMail's responseBufferLimit says. Any command whose result included that mail failed. post fetch <uid> --eml still worked, because a body is a literal, not a line.

Change

  • SwiftMail 1.16.0, pinned by revision (c3b7bc3, Accept response lines longer than 8 KiB SwiftMail#253). It pins swift-nio-imap to main for Allow configuring IMAP client line buffer size apple/swift-nio-imap#849 (configurable line buffer, merged but not yet released) and passes the 1 MB responseBufferLimit to IMAPClientHandler. SwiftPM can't resolve a version requirement on a package with a revision-pinned dependency, so this is a revision pin too. It goes back to .upToNextMajor once swift-nio-imap tags a release with #849.
  • SwiftText 2.3.0 → 2.4.0 in the lockfile (alert boxes in every format, readable zip entry permissions).
  • macOS floor 14 → 15. Every swift-nio-imap commit with #849 declares macOS 15. README updated.

Verified

  • swift test: all pass (63 + 8 + 5 + 2; 4 skipped as before).
  • Against the real server, with the launchd postd briefly replaced by this build: post search --server drobnik --from zupancic --since 2026-09-01, post list --server drobnik --limit 5 and post fetch 21835 --server drobnik (the 74-attachment mail) all return results instead of the error.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T08:06:49.673070Z 57fc1e5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

odrobnik and others added 2 commits October 9, 2026 10:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 <noreply@anthropic.com>
@odrobnik
odrobnik merged commit 6ffddfe into main Oct 9, 2026
2 checks passed
odrobnik added a commit that referenced this pull request Oct 9, 2026
Outlook names a file attached from a folder after its Windows path and
doesn't escape the backslashes, so the 74-attachment mail behind #52
listed zpo-berufung\reference\akt.md as zpo-berufungreferenceakt.md and
two LIESMICH.md files in different folders looked the same. SwiftMail
#254 keeps those backslashes for both .eml files and IMAP. It is now part
of the SwiftMail 1.16.0 release, so the pin moves to its commit.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant