Skip to content

Feature: Shared IMAP Folder Support

User Need

Besides whole mailboxes that App Suite provisions as shared accounts (dedicated addresses like support@company.com, granted to users and groups), many organizations use IMAP folder sharing:

  1. Public namespaces — admin-configured, server-wide folders (e.g., Public/Support) visible to all users
  2. User-to-user sharing — individual users share their folders via IMAP ACLs (e.g., a colleague shares their "Escalations" folder)

Teams now supports both types alongside shared accounts. Any IMAP folder a team cares about can be monitored, synced, and collaborated on.

User Stories

  • As an admin, I want to configure public IMAP folders in Dovecot so that my teams can monitor them collaboratively in Teams without setting up dedicated shared accounts.
  • As a user, I want to share my mail folder with colleagues so they can triage incoming mail in Teams.
  • As a team member, I want shared folders to appear automatically in Teams, so I do not have to configure anything manually.
  • As a team member viewing a shared folder, I want to reply to emails and have the reply come from my own address, so recipients know who they are talking to.
  • As a team lead, I want to use Teams with a mix of shared accounts and shared folders, so we can adopt them incrementally without disrupting existing workflows.

Concrete Scenarios

Scenario A — Support team without a shared account: The admin configures a Public/Support folder in Dovecot. When team members open Teams, they see "Support" alongside any shared accounts. They can triage, assign, and reply to threads in that folder.

Scenario B — User shares a folder: A colleague shares their ad-hoc mail folder via IMAP ACL. Team members with access see it in Teams as "Colleague Name / ad-hoc" and can collaboratively manage threads.

Scenario C — Mixed shared accounts and shared folders: The team uses support@company.com as a shared account and also monitors Public/Escalations. Both appear in the sidebar under "Shared Inboxes". Threads in the shared account send replies from support@company.com. Threads in shared folders send replies as the replying user.

Scenario D — Temporary project folder: The admin creates Public/Project-Alpha for a cross-functional project. Team members use it to coordinate on incoming mail. When the project ends, the admin removes the folder — it disappears from Teams on the next sync.

Reply Identity

MVP: Reply as yourself

The replying user sends from their own email address, regardless of which shared folder the thread lives in.

Rationale:

  • No server-side delegation configuration needed (works out of the box)
  • Transparent to recipients — they know who they are talking to
  • MW mail?action=new already sends as the authenticated user by default

Limitation: Recipient sees the user's personal address instead of a team address. Less "team brand" consistency than shared accounts.

Future: Configurable per folder (Phase 3)

Add per-folder reply identity setting for organizations with Dovecot send-as delegation configured.

Discovery

Teams calls the existing App Suite middleware folder?action=allVisible&content_type=mail API. Both public namespace folders (type=2) and user-shared folders (type=3) appear in the private array:

{
  "private": [
    ["default0/Public/Support", "Support", 2, 1883275524, 0, true],
    ["default0/shared/colleague@example.com/ad-hoc", "ad-hoc", 3, 536903937, 0, true],
    ["default0/INBOX", "Inbox", 1, 809533700, 0, true]
  ]
}

Teams filters for type === 2 (public) or type === 3 (shared), and requires read+write permissions (ownRights). Namespace root containers (with no permissions) are excluded.

Teams does NOT manage folder creation, ACLs, or subscriptions. If a folder disappears from the allVisible response, it disappears from Teams. Sharing is configured in App Suite mail settings or Dovecot.

Useful response fields

ColumnFieldUse
1idFolder identifier (path-based, e.g., default0/Public/Support)
300titleDisplay name for sidebar
302type2 = public namespace, 3 = user-shared
305own_rightsEncoded permission bits (7-bit fields for folder/read/write/delete/admin)
311unreadUnread count for badges
314subscribedIMAP subscription status

Feature Description

Folder Sync

A public folder's inbox ID is its folder path (e.g. default0/Public/Support); contexts on one mail domain read the same folder and share its inbox. A folder one user shares with others is scoped to its context (e.g. 42/default0/Shared/info/Orders), because the same path repeats in other contexts. Each inbox gets its own sync token, stored per inbox in the database. The folder path from the allVisible response is used directly in mail?action=sync and mail?action=threadedAll calls.

Thread Management

Threads in shared folders support the same workflows as shared accounts: assignment, categories, status tracking, comments, collaborative drafts, and "Assigned to me" aggregation. The assignee dropdown shows only users with access to the current thread's inbox.

Comment Threads

Comment threads (internal discussions without an email) can be created on any shared inbox, including shared folders.

Shared folders appear alongside shared accounts in the unified "Shared Inboxes" section. Icons are guessed from folder names (e.g., "Support" gets a headset icon, "Billing" a cash icon). Unrecognized names get a folder icon.

Shared Inboxes
  headset-icon  Support (support@company.com)      [account]
  cash-icon     Billing (billing@company.com)       [account]
  headset-icon  Support                             [public folder]
  folder-icon   ad-hoc                              [user-shared folder]

Acceptance Criteria

  • Public namespace folders and user-shared folders appear in the sidebar automatically
  • Shared folders sync mail using the folder path from the API
  • Threads in shared folders store a folder identifier in the inbox JSONB field
  • Replies from shared folders send as the replying user's own email address
  • Shared accounts continue to work exactly as before (no regression)
  • Comment threads can be created on shared folders
  • Assignee dropdown scoped to users with access to the current inbox
  • Removing a shared folder removes it from Teams on next sync
  • Sidebar uses unified "Shared Inboxes" section with icon guessing
  • The "Assigned to me" view includes threads from shared folders
  • All user-visible strings use gt() for translation

Edge Cases and Risks

Folder removed or access revoked

  • allVisible no longer returns it -> removed from sidebar on next sync
  • Threads already imported remain in DB as historical records

Folder renamed

  • The folder ID is path-based (not stable across renames)
  • A rename creates a "new" folder and orphans the old one
  • Mitigation: admin-managed paths are typically stable

Permission changes

If permissions are reduced below read+write, the folder disappears from Teams on next sync.

Out of Scope

  • Folder creation/management from Teams UI
  • ACL or subscription management from Teams UI
  • "Reply as folder address" (Phase 3)
  • Nested subfolder display within a shared folder
  • Notification preferences per folder
  • Folder-level settings (auto-assign rules, SLA)

Dependencies

  • Dovecot public namespaces or ACL sharing configured in the deployment environment
  • MW folder?action=allVisible&content_type=mail returns shared folders (existing API)
  • MW mail?action=sync and mail?action=threadedAll work with shared folder paths