Repository navigation
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 passesresponseBufferLimit(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 becamezpo-berufungreferenceakt.md.EMLParsernow unescapes only\"and\\inside a quoted value, as Python'semail.utils.unquotedoes. Over IMAP, where Dovecot has already dropped the backslashes from BODYSTRUCTURE,fetchStructurerestores them from each named part's MIME header. That costs one extra FETCH ofBODY.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 (
14ad388onmain) 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 commit88c45cb). 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, aFlag.Keywordstring literal resolves to the non-failable initializer, andQuotaResource.resourceNameis aName. 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).