This confirms Stalwart doesn’t offer per-mailbox or per-label filtering for push notifications at the server level. Push subscriptions in JMAP (RFC 8620/8030) support a types filter for object types (e.g. Email, Mailbox) via the PushSubscription object’s types property, not per-folder filtering, and Stalwart follows this: notifications are triggered by state changes to types, with no folder/label scoping option server-side.
This confirms push subscription types filter only by data type (Email, Mailbox, etc.), not by folder/mailbox instance or label. There’s no mailbox-specific filtering in the JMAP spec’s push mechanism itself.
Given this, I’m confident that the current Stalwart JMAP push implementation has no mechanism to restrict notifications by mailbox/folder or label.
Based on this, there is no support in Stalwart’s JMAP push notification system for filtering by mailbox/folder or label. The types parameter on push subscriptions and the event source only filters by data type (Email, Mailbox, Thread, etc.), not by which mailbox a message belongs to. Any change notification to the Email data type in the account fires regardless of which folder the message lands in.
JMAP push notifications in Stalwart are scoped to a subscription’s types list (e.g. Email, Mailbox, EmailSubmission, etc.), not to specific mailboxes or folders. There is no field in the PushSubscription or EventSource mechanism that filters by mailbox, label, or the Junk/Spam folder specifically. Every state change of a subscribed type (including a message being sieve-filed into a spam folder) triggers a notification, since JMAP’s state-change model tracks changes to a data type across the account, not per-container.
This is a limitation of the JMAP push model as implemented (it mirrors the RFC 8620/8030 design, which only exposes type-level granularity), not something configurable via Stalwart settings. Filtering notifications by folder would have to happen client-side, if the client supports checking which mailbox an email landed in before alerting the user. See the push notifications reference for the fields that are configurable: Push notifications | Stalwart
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.