Add the IMAP write primitives and drain the outbox #29
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!29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/write-primitives"
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 #12. Part of the phase 2 epic (ADR 0004).
What changes
actions.pyapplies the four action kinds for the sync worker. No tool exposes them yet; #13 adds the tools.\Draft. From comes fromfrom_addressor the login. Recipients are one address each, and CR or LF anywhere is refused. A reply takes In-Reply-To, References and "Re:" from the mirrored message.\Seenand\Flaggedonly, in one mailbox, with UIDVALIDITY checked.\Deletedand UID EXPUNGE of those UIDs only. With neither MOVE nor UIDPLUS the move is refused asunsupported. Trash and Junk are never targets, and the target must be mirrored. New UIDs come from COPYUID, else from a Message-ID search.\Draftand its size is unchanged.outbox_poll_seconds(default 2) and drains as soon as an action is queued.failedand is never retried, so a retry cannot append a second draft. Request errors settle asrefused.actionsgains anaccountcolumn.MessageRowexposesin_reply_to. Accounts take an optionalfrom_address.Note on schema v2
The
accountcolumn changes the v2actionstable that #26 added. v2 has not been released, so no deployed mirror has the old shape. A local mirror created frommainsince #26 needs itsactionstable dropped, or a fresh mirror.Tests
make check: 73 unit tests pass, plus ruff, mypy --strict and pip-audit.make test-integration: 6 pass against GreenMail 2.1.15. They cover a reply draft and its undo, a changed draft left in place, a flag and its undo, a move and its undo on the MOVE path and on the COPY + UID EXPUNGE path, and the refusals for a Trash target and a stale UID. The tests delete the folders they create.🤖 Generated with Claude Code