Read-only calendar share grants access to the sharer's mailbox

Issue Description

Colleagues have shared their calendar with me (read-only). In addition to
the calendar, I can also access their mailboxes, although no mail sharing
was configured.

In the Stalwart admin UI, the only permission/ACL visible for my account on
their resources is the read-only calendar share. No mailbox ACL, no group
membership or role granting mailbox access.

Expected Behavior

User B only sees User A’s calendar (read-only).
Actual: User B can also [list folders / read messages] in User A’s mailbox.

Reproduction Steps

  1. User A shares their calendar with user B, read-only.
  2. User B logs in to [Bulwark / IMAP client].
  3. User B can see [and read] User A’s mailbox folders/messages.

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

OIDC

Additional Context

Bulwark Webmail v1.13.0 or EMclient
Authentik

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

A calendar share only grants access to the calendar collections, and mail access is checked mailbox by mailbox, so on its own it shouldn’t expose anything in A’s mail. I couldn’t find a path in the code where it does. What does give full access to another account is membership: if B ends up as a member of A’s account, or of a group that owns those mailboxes, B sees all of it. With Authentik as the directory, group claims mapped to Stalwart groups are the first place I’d look.

The template placeholders are still in your post, so I’m not sure what B can do exactly. Which client shows the mail (Bulwark over JMAP or eM Client over IMAP)? Does B only see folder names, or can B open messages? Is A an individual account or a group, and which groups and roles does B have after logging in through Authentik?

Okay, I just figured it out. It’s because my account has the “Administrator.” If I set it to “User” it works fine.

I find this behavior a little strange, but in any case, it lets me solve my problem.