Skip to content

Beta 0.4

Compare
Choose a tag to compare
@foxcpp foxcpp released this 26 Feb 21:35
· 56 commits to master since this release
d7d4cb3

⚠️ This release includes schema changes that can't be applied to existing databases. Manual export-wipe-import is required.
⚠️ Minimal required Go version is increased to 1.13

This release includes changes accumulated over a long period. This release is lined up with maddy 0.1 release. go-imap-sql is developed for use in maddy mail server but remains usable as a standalone go-imap backend.

Removed features

  • Code for storing message contents in table rows is removed, this has proven to be impractical (4c8996e)
    Messages contents now can be handled using only External Store interface.
  • MySQL/MariaDB is no longer actively supported (45b437d).

Enchantments

  • Usernames are now case-insensitive (3f1507c).
  • Schema upgrade restrictions are removed, no more need to run imapsql-ctl with --allow-schema-upgrade (45cd989).
  • Optional LZ4 and Zstd body compression is added (aa76135, d6bc61c).
  • Additional interface optimized for efficient SMTP delivery is added. It was designed for use in maddy mail server (b4f87c7, 00be958, f53ec0a, 0d4a873).
  • DB serialization failures are now reported as a separate driver-independent object (d7d4cb3)
  • pkg/errors library is replaced with Go 1.13 error inspection (19bcb2a)
  • Message contents are not flushed to disk (fsync) before completing delivery or APPEND (6cd51e)
  • Errors returned to clients are now logged (42bd4cf)

RFC 3501 conformance

  • INBOX is now created for each new user (4ab80a4)

imapsql-ctl features

  • Message flags editing support is added (d5c43e4)

Performance

  • Message creation uses Read Committed isolation with explicit locking. This allows concurrent writes without serialization failures (e09d6f8, dbd4222).
  • Rudimentary \Recent flag support is replaced with stubs (f1109de).
  • FirstUnseenSeqnum updates are not longer generated after a new message is added. This is turned out to be expensive on PostgreSQL and is not required by RFC 3501 (12981df).
  • FirstUnseenSeqnum query no longer scans entire messages table (9244a53, 0114762, cac48d9).
  • Message count is now cached in a separate column instead of being recalculated at each command that requires it (9244a53, 0114762).
  • (SQLite tuning) WAL autocheckpoint interval is increased to 5000 pages (b3a28be).
  • Compiled auto-generated flag modification queries are now properly cached (d81a059)
  • MOVE/COPY performance is slightly improved by removing unnecessary intermediate operations (161bee8)

Bugfixes

  • Body reader is closed earlier during search-scan. Previous behavior could lead to FD limit exhaustion when FS storage is used (379ca8e).
  • imapsql-ctl: Fix missing error checking in connectToDB (fe0c354).
  • Fix header added to BODY[TEXT] when body is fetched multiple times (e724fbd).

Misc

  • Remove bodyLen=15 assignment added during testing (ddc595f).
  • fsstore: Reenable blacklisted tests (bd90023).
  • Add missing cleanBackend call to tests (01cd62d).