Feature: read receipts (MDN, RFC 8098)#369
Merged
Merged
Conversation
Bulwark had no read-receipt support (JMAP/Stalwart have no native MDN). End-to-end, client-side, in three parts: - Request (compose): a toolbar toggle (MailCheck, green when on) sets Disposition-Notification-To on the outgoing message via the JMAP "header:<name>:asText" create property. Threaded composer -> page -> email-store -> client.sendEmail. Default from requestReadReceiptDefault. - Detect (viewer): reads Disposition-Notification-To case-insensitively from the parsed headers and shows a banner (green Send / red Ignore) in the unified notification bar. Hidden in Sent/Drafts/Trash/Junk and once handled. message/disposition-notification + message/delivery-status report parts are filtered out of the attachment list. - Respond (MDN): lib/mdn.ts builds an RFC 8098 multipart/report (text/plain + message/disposition-notification, UTF-8/base64, localized subject + body). client.sendReadReceipt uploads the blob, imports it into Sent via Email/import, then submits with an explicit envelope. Both Send and Ignore set the $MDNSent keyword (RFC 3503) so no client re-prompts. Behaviour configurable: ask / always / never. New: lib/mdn.ts, read-receipt-banner.tsx. Settings (requestReadReceiptDefault, readReceiptResponse) + UI. All 17 locales.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bulwark has no read-receipt support (JMAP/Stalwart have no native MDN). This adds it end-to-end, client-side: request one when sending, detect incoming requests, and respond with a standards-compliant MDN.
Changes
Disposition-Notification-Toon the outgoing message; default from a newrequestReadReceiptDefaultsetting.Disposition-Notification-Toand shows a banner (Send / Ignore), hidden in Sent/Drafts/Trash/Junk and once handled.lib/mdn.tsbuilds an RFC 8098multipart/report(two-part per §3.1, UTF-8/base64 text part, localized subject/body);client.sendReadReceiptreuses the existing client primitives (blob upload ->Email/import->EmailSubmission/set) and sets the$MDNSentkeyword (RFC 3503) so it never re-prompts. Behavior configurable: ask / always / never.message/disposition-notificationreport parts filtered out of the attachment list. Strings added to all 17 locales.Type of Change
Checklist
npm run typecheck && npm run lintand there are no errorsnpm run build)locales/) if my changes affect user-facing textNotes for Reviewers
Tested end-to-end on Stalwart Mail Server: request/detect/respond all work, the generated MDN is accepted, and the
$MDNSentkeyword suppresses re-prompts. The existing JMAP client + email-store test suites pass unchanged (24 tests across resilience + multi-account).