juan.ca
← All projects

SwiftMail

Live

My contributions to Cocoanetics' SwiftMail, an open-source Swift IMAP and SMTP library

Source (opens in a new tab)
Kind
Open-source contribution
Platforms
macOS, iOS, Linux
Stack
  • Swift
  • SwiftNIO
Active
Sep 2026 – Oct 2026

Highlights

  • Added ENABLE and QRESYNC mailbox synchronization to the IMAP client
  • Made SMTP connection timeouts configurable, with up to five minutes for the greeting

SwiftMail is Cocoanetics’ Swift package for IMAP and SMTP, built on SwiftNIO and Apple’s swift-nio-imap. Signalist uses it, and I’ve sent two changes upstream.

The first adds ENABLE and QRESYNC. A client that stored a mailbox’s checkpoint can select it with QRESYNC and get back the UIDs that vanished and the flags that changed since then, instead of fetching everything again.

The second fixes SMTP connections that gave up too early. The client waited a fixed five seconds for the server’s greeting, and some submission servers take longer. Timeouts are now configurable, the greeting gets five minutes as RFC 5321 recommends, and each timeout names the step that failed.

Merged upstream