Skip to content

1.16.0

Latest

Choose a tag to compare

@odrobnik odrobnik released this 09 Oct 08:55
· 0 commits to c3b7bc3a6b77509655668651c744934470fa2d86 since this release
88c45cb

Highlights

SwiftMail 1.16.0 parses IMAP response lines longer than 8 KiB and keeps the folder paths in attachment names that Outlook writes unescaped. Until now, a single long line, such as the BODYSTRUCTURE of a message with dozens of attachments, failed with PayloadTooLargeError, whatever responseBufferLimit said. To get there, SwiftMail pins swift-nio-imap to main and raises its platform floors.

Changes

Fixes

  • Response lines longer than 8 KiB parse (#253). swift-nio-imap 0.4.0 hardcodes IMAPClientHandler's line buffer at 8 KiB. apple/swift-nio-imap#849 makes it configurable, and SwiftMail now passes responseBufferLimit (1 MB by default) to it. In Post, one real mail with 74 attachments made every list, search and fetch that touched it fail. A new test covers a FETCH line over 8 KiB.
  • Outlook attachment names keep their backslashes (#254). Outlook names a file attached from a folder after its Windows path (zpo-berufung\reference\akt.md) and doesn't escape the separators. Read as strict RFC 2045 quoted pairs, the name became zpo-berufungreferenceakt.md. EMLParser now unescapes only \" and \\ inside a quoted value, as Python's email.utils.unquote does. Over IMAP, where Dovecot has already dropped the backslashes from BODYSTRUCTURE, fetchStructure restores them from each named part's MIME header. That costs one extra FETCH of BODY.PEEK[n.MIME] per message with named parts.

Breaking

  • Platform floors raised to macOS 15, iOS 18, tvOS 18, watchOS 11, visionOS 2 and Mac Catalyst 18 (#253). Every swift-nio-imap commit with #849 declares these floors, so its next release will require them as well.
  • swift-nio-imap is pinned by revision (14ad388 on main) until a release includes #849. SwiftPM cannot resolve a version requirement on a package with a revision-pinned dependency, so consumers have to pin SwiftMail by revision too (this release is commit 88c45cb). SwiftMail returns to a version requirement once swift-nio-imap tags a release with #849.

Dependencies

  • Adapted to the stricter swift-nio-imap API (#253). AuthenticationMechanism(_:) is failable, a Flag.Keyword string literal resolves to the non-failable initializer, and QuotaResource.resourceName is a Name. SwiftMail's public API is unchanged.

Tests

  • Channel-driven tests wait up to 10 s for an outbound line instead of 1 s, which fixes flaky failures on loaded macOS runners (#253).