Repository navigation
feat(mail): catch verification codes that land in junk - #13
Merged
Merged
Conversation
Providers such as Outlook often file one-time codes as junk, where DaMail never analyzed them and no notification went out. - Analyze new junk mail like the inbox, but only push message.verification: no inbox rules and no received or important notifications for junk - Sync junk alongside the inbox every minute: Graph polls it with the inbox, IMAP checks UIDNEXT with STATUS and syncs only on change - Count and list junk mail under the Verification category; other categories and cross-folder views still leave junk out - Add a cross-mailbox Junk view (view=junk) with a junkTotal count - Add "Move to Inbox" to the junk list toolbar, thread and message context menus and the reader; threads/batch accepts action=inbox and only moves the junk messages of each thread Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Providers such as Outlook often file one-time codes (e.g. TikTok sign-in codes) as junk. DaMail only analyzed new inbox mail, so those codes were never extracted, never pushed, and didn't show up under the Verification category. There was also no place to see junk across all mailboxes.
What
Analysis and push
message.verification: no inbox rules run and nomessage.received/message.importantnotifications go out for junk.Sync
pollInterval(default 5 min).STATUScheck on UIDNEXT; the folder is synced only when it changed, so the account doesn't flip to "syncing" every minute.Views and counts
view=junk,junkTotalin stats); REST/api/v1/threadsacceptsview=junk.Move to Inbox
threads/batchacceptsaction: inboxand only moves the junk messages of each thread; merged cross-mailbox copies move too.Docs
Testing
pnpm typecheckpasses.pnpm testpasses: server 183, web 18.server/test/junk-verification.test.tscovers:junkTotalthreadMessageIds(…, 'inbox')picks only junk messages🤖 Generated with Claude Code