Skip to content

v1.5.2

Choose a tag to compare

@maathimself maathimself released this 12 Jun 02:27

v1.5.2 — Rules engine reliability

This release is a comprehensive fix for the inbox rules engine. Several bugs were causing rules to silently misbehave: moved messages vanishing from the inbox without arriving in the target folder, subsequent rules firing on already-relocated messages, incorrect match semantics for not_contains, and notification suppression not working for mark_read rules.

Bug fixes

Rules engine — message routing

  • Fixed a race condition where IMAP EXPUNGE events triggered by a rule-initiated move could cause reconcileDeletes to delete the DB row before the destination UID was recorded, making messages vanish from both folders. All move paths (rule actions, user-initiated moves, snooze) are now guarded against this race.
  • Fixed an issue where subsequent rules would attempt IMAP operations on a message already moved by an earlier rule, generating error logs and unnecessary IMAP round trips. Non-destination actions (mark_read, star) in later rules now correctly continue to fire after a relocation; only additional destination actions are skipped.
  • Fixed move action for all-accounts rules (account_id = null) being incorrectly allowed at the API level. Move actions require a specific account context and are now rejected for all-accounts rules.
  • Fixed a bug in not_contains matching on the from field: both email address and display name must not contain the value (was using OR, now uses AND, so a sender cannot escape the filter via a non-matching display name).
  • Fixed a bug in not_contains matching on the to field with multiple recipients: all recipients must not contain the value (was using some(), now uses every(), so a single non-matching recipient no longer incorrectly triggers the rule).
  • Fixed an edge case where a blank condition value (contains "") would silently match every message, potentially moving or deleting all incoming mail.

Rules engine — notifications and counts

  • Fixed mark_read rules not suppressing sound, toast, and push notifications. Messages actioned by a mark_read rule are now excluded from the alert path; the message list still refreshes but no sound or push is sent.
  • Fixed per-folder unread and total counts drifting after rule actions. move, archive, delete, and mark_read actions now immediately update the folder count cache rather than waiting for the next reconcile cycle (~10 minutes).
  • Fixed a potential double-decrement of the unread count when a mark_read rule fires at higher priority than a move rule targeting the same message.

Rules API

  • Fixed header conditions with a blank headerName being silently saved and never matching. The API now returns a validation error requiring a non-empty header name.

Internal

  • Added 14 new unit tests covering the above scenarios, bringing the rules test suite to 25 tests (190 total across all suites).
  • All IMAP move paths (rule actions, block list, user-initiated delete/snooze, snooze wakeup) now use a consistent UID guard pattern to prevent reconcile race conditions.