Add JMAP writes for the outbox #69
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp!69
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/jmap-writes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #57. Parent: #51 (Phase 6). Decision: ADR 0006 §10, ADR 0004.
Changes
jmap.py, applied by the sync worker as for IMAP:compose_draft, uploaded as a blob, then created withEmail/importin Drafts with$draftand$seen. The inverse keeps the blob id that the import returns, because Stalwart stores the message under a new blob.Email/setpatches onkeywordsandmailboxIds. Each one carriesifInState, which is the Email state read just before the patch.conflict. The action isfailed, notrefused, so the client can ask again. Nothing is overwritten.$draftand its blob id.unsupported. A draft needsfrom_address, becauseIdentity/getneeds the submission scope.EmailSubmissionis never called.flag_changes) and the draft building (draft_from) move tooutbox.py. The undo checks (undo_target) move tosource.py. Both sources use them, so the IMAP behaviour does not change.draft_idand theidsof a move are in the stable form for a JMAP account.config.example.tomland CLAUDE.md describe the JMAP writes and the token they need.Checks
make check: 180 passed. Ruff, mypy and pip-audit are clean.make test-integration: 14 passed (8 GreenMail, 6 Stalwart). The new Stalwart tests cover draft, flag and move, the undo of each, a Junk target refused, and a concurrent change that fails withconflict.Not in this PR
🤖 Generated with Claude Code