Commit Graph
397 Commits
Author SHA1 Message Date
Michel-Marie MAUDETandClaude Opus 4.7 b3afc52a82 feat(search): filter and sort messages by server-side timestamps
POST /api/v1/search-messages previously filtered and sorted only on the
sender-controlled Date: header. Add support for two server-controlled
timestamps that are already indexed as FAST i64 fields:

- internal_date (IMAP INTERNALDATE)
- ingest_at (Bichon's archival time)

EmailSearchFilter gains internal_date_since/before and ingest_since/before
range bounds, mirroring the existing `since`/`before` Date: handling.
SortBy gains InternalDate and IngestAt variants (wire values INTERNAL_DATE
and INGEST_AT), mirroring the existing DATE/SIZE sort handling.

The envelope and attachment Tantivy schemas already declare these fields
as INDEXED | STORED | FAST, so no re-index or migration is required.
Attachments carry no IMAP INTERNALDATE, so the attachment search maps the
InternalDate sort to the attachment's own date field as a defined fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 13:55:23 +02:00
Michel-Marie MAUDETandClaude Opus 4.7 171a40d70f fix: self-heal missing content blob in download-message
The download-message REST endpoint returned 404 [30000] "Original email
content not found" whenever an indexed message's raw content blob was
missing from the blob store, leaving the message permanently
unrecoverable even though it still existed on the IMAP server.

Make the endpoint self-healing: when the content blob is absent, fetch
that one message on demand from the IMAP server via
UID FETCH <uid> (BODY.PEEK[]), repopulate the detached blob, and return
the content. The 404 is now only produced when the on-demand fetch
itself fails (mailbox gone, UID gone, connection failure, or the fetched
bytes no longer match the archived content_hash).

- Add ImapExecutor::fetch_single_message_body: examines the mailbox
  read-only and fetches one message by UID, reusing the existing
  BODY.PEEK[] fetch command.
- Add reattach_eml_content_self_healing / recover_message_blob in the
  envelope extractor: fast-path delegates to reattach_eml_content when
  the blob exists; otherwise recovers it via IMAP and re-stores the
  stripped EML + attachments through the existing blob queue.
- Make store::blob::get_reader async and route it through the
  self-healing path; update the single caller (download_message).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 13:46:40 +02:00
Michel-Marie MAUDETandClaude Opus 4.7 895ea543a9 fix(core): commit/reload barrier before dedup GC reference count
cleanup_unused_content decides whether to delete a deduplicated blob by
running a Tantivy Count of envelopes referencing each content_hash. The
searcher it used reflected only the committed index state at the time it
was built, so an envelope that shared a content hash but was still
sitting uncommitted in the IndexWriter buffer (for example added by the
background ingest task before the delete operation acquired the writer
lock) was invisible to the count. The count read 0 and a
still-referenced blob was deleted, permanently 404ing that envelope's
download-message.

Pass the locked IndexWriter into cleanup_unused_content and fatal_commit
it immediately before creating the searcher. create_searcher already
reloads the reader, so the Count is now evaluated against a fully
committed, freshly-reloaded index state. The barrier is local to the GC
path and self-contained, independent of what the caller committed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 13:40:43 +02:00
rustmailer 6eca351994 update i18n 2026-05-21 23:52:26 +08:00
rustmailer 1f477eca65 bump to v1.2.0 2026-05-21 23:33:26 +08:00
rustmailer a3cdc094e8 feat: Strip remote data from emails when viewed #54 2026-05-21 23:32:42 +08:00
rustmailer 95147a7824 bump to v1.1.3 1.1.3 2026-05-21 18:31:00 +08:00
rustmailer b22811f78c fix: Transparent menu on iPhone #253 2026-05-21 18:29:03 +08:00
rustmailer fd61d013a2 fix: Imported emails and UTF-8 folders missing #182 2026-05-21 17:57:43 +08:00
rustmailer 3a950e7591 fix: account name don't change when Update Account #248 2026-05-21 10:38:04 +08:00
rustmailer f17820bfa8 fix: add missing attachment index cleanup logic 2026-05-21 08:45:30 +08:00
rustmailer 178b25d27d fix:After deleting an email, its attachment remains visible/active in the application #245 1.1.2 2026-05-20 17:40:12 +08:00
rustmailer d160ca75f5 fix: migration link doesn't exist #244 2026-05-20 17:19:31 +08:00
rustmailer 04136a4ae2 bump to v1.1.2 2026-05-19 23:58:52 +08:00
rustmailerandGitHub 1d6f5d9a22 Merge pull request #243 from tremor021/smallfix
Fix small typo in store.rs
2026-05-19 23:56:11 +08:00
rustmailer 105a6d9b15 Update dedup.rs 2026-05-19 23:50:46 +08:00
rustmailer df440c8441 Update README.md 2026-05-19 23:33:44 +08:00
Slaviša ArežinaandGitHub 4116a59b79 Merge branch 'main' into smallfix 2026-05-19 17:28:15 +02:00
rustmailer 609eee1b84 show storage and index usage to everyone 2026-05-19 23:25:36 +08:00
tremor021 79b9f07888 fix small typo in store.rs 2026-05-19 17:18:10 +02:00
rustmailer ba28369202 update 1.1.1 2026-05-19 13:58:20 +08:00
rustmailer ff64b66f79 fix: Migration to v1.0 panics with index out of bounds: the len is 0 but the index is 0 #234 2026-05-19 12:12:37 +08:00
rustmailer a4f8e674c3 Update Cargo.lock 1.1.0 2026-05-18 20:46:31 +08:00
rustmailer dde6b990da bump to v1.1.0 2026-05-18 20:46:19 +08:00
rustmailerandGitHub 6b1f843bd5 Merge pull request #237 from rustmailer/fix/cli-mbox-memory
fix: bichon-cli OOMs on import #233
2026-05-18 20:27:03 +08:00
rustmailer 66fd50bc23 fix: bichon-cli OOMs on import #233 2026-05-18 20:25:13 +08:00
rustmailerandGitHub 9daab241b0 Merge pull request #236 from rustmailer/fix/deduplication
feat: add async index deduplication task
2026-05-18 18:03:14 +08:00
rustmailer 85d5490834 feat: add async index deduplication task 2026-05-18 15:30:37 +08:00
rustmailer 6e984f376c Update Cargo.lock 1.0.2 2026-05-17 12:29:48 +08:00
rustmailer 7470125a23 bump to v1.0.2 2026-05-17 12:29:42 +08:00
rustmailer 469d254e2b fix: can't select folders & scroll issue in Choose Mailboxes #222 #217 2026-05-17 12:26:49 +08:00
rustmailer 7fde7ee19a update 2026-05-17 10:35:32 +08:00
rustmailer d543508a23 fix: Overviews are breaking out of their boxes on the dashboard (v1.0.0) #218 2026-05-17 10:35:25 +08:00
rustmailer f440069912 add debug info in bichon-cli #224 2026-05-17 10:35:07 +08:00
rustmailer 9f9fc71d16 bump to v1.0.1 1.0.1 2026-05-16 22:19:15 +08:00
rustmailer b2a75643da fix(bichon-admin): reduce memory usage during data migration 2026-05-16 22:17:03 +08:00
rustmailer 37a38a2910 Update README.md 2026-05-15 12:21:06 +08:00
rustmailer 8817ed96f6 Update README.md 2026-05-15 12:19:50 +08:00
rustmailer 1ee2eade3a fix: rename bichonctl to bichon-cli 2026-05-15 12:07:26 +08:00
rustmailer 7afb1e29aa refactor: replace autoconfig with native impl, remove openssl dependency 1.0.0 2026-05-15 11:27:06 +08:00
rustmailer 715858183d Update pnpm-lock.yaml 2026-05-15 10:11:29 +08:00
rustmailer 407d865a9a update 2026-05-15 10:07:02 +08:00
rustmailer e708dc524b Update reset.rs 2026-05-15 01:17:40 +08:00
rustmailer 55996f8f9b Update README.md 2026-05-15 00:23:27 +08:00
rustmailer 8bb39b4095 update 2026-05-14 22:45:46 +08:00
rustmailer 0a7a22fa7f Update index.tsx 2026-05-14 22:15:58 +08:00
rustmailer 3fa4fe453c update 2026-05-14 22:11:10 +08:00
rustmailer 907e59027d update 2026-05-14 20:40:38 +08:00
rustmailer 3ea330c884 update 2026-05-14 20:25:56 +08:00
rustmailer d52c5eef3e update 2026-05-14 20:20:10 +08:00