Support JMAP Protocol as Alternative to IMAP
Open
@SebastianKrupinski is already working on this.
Since Mar 11, 2026.
2. developing
enhancement
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Feature Request
As a user with a JMAP-enabled mail account (Fastmail, Stalwart, etc.), I want to use Nextcloud Mail
to access my email via JMAP. Currently, only IMAP is supported.
Implementation
JMAP (RFC 8620/8621) support is implemented by:
- Introducing a protocol abstraction layer that allows the service layer to work with both IMAP and JMAP
- Creating JMAP-specific client, mappers, and sync logic under
lib/JMAP/namespace - Reusing domain models and service layer abstractions across both protocols
- Adding protocol selection to the account setup UI
Key library: SebastianKrupinski/jmap-client-php
References:
- RFC 8620: The JSON Meta Application Protocol (JMAP) - Mail
- RFC 8621: The JSON Meta Application Protocol (JMAP) - Calendars
- https://jmap.io/
Scope
MVP (Phase 1)
- Protocol selection (IMAP / JMAP) in account setup
- Connect to JMAP servers with username/password
- Sync mailbox structure from JMAP servers
- Fetch messages with headers, flags, and IDs
- Flag operations (read/unread, custom flags)
- Move, copy, and delete messages
- Send via SMTP (uses existing flow)
- Use existing threading algorithm with JMAP message IDs
- Integration tests against Stalwart JMAP server in CI
- Existing IMAP accounts continue working
Out of Scope
- Auto-detection of JMAP server capability
- OAuth2 authentication
- Sieve filters
- JMAP collaboration/sharing features
Work Packages
See linked sub-issues.
Follow-ups
- Auto-detect JMAP capability during account discovery
- OAuth2 authentication for JMAP providers
- Sieve filters for JMAP accounts
- JMAP collaboration and sharing features
Dependencies
- SebastianKrupinski/jmap-client-php PHP library
- Stalwart JMAP server docker container in CI
Notes
Implementation note: An AI agent was used in the planning phase of this feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.