github s1t5/mail-archiver 2608.1

2 hours ago

πŸ‘‹Hello everyone and thank you very much for all the support this project is receiving! After a few weeks, now one of the biggest releases so far goes live. A big thanks here to @Zappo-II for the contribution of the feature for Account Offload which allows to move accounts between servers without having to migrate the entire archive stock.

🌐 Roadmap & Project Portal:

Portal here
Includes a Kanban board with current development status of Issues and Feature Requests.

✨ New Features

  • Date-Windowed Offload into Another Mailbox - New offload job type that appends archived emails of a selectable date window into another mailbox, with whole-mailbox duplicate detection, folder renames/exclusions, a dry-run report and resumable per-target locking. (PR #522 Thanks to @Zappo-II )
  • Stats API Endpoint - New GET /api/v1/stats endpoint returning aggregate archive statistics (total emails, accounts, attachments, database size) as JSON, respecting per-user account access scoping

βš™οΈ Improvements

  • Nested Folder Tree with Container Folders - The archive folder tree now renders the full hierarchy (e.g. travel β–Έ 2022 β–Έ France) even when intermediate folders hold no emails. Selecting a parent folder also includes the emails of all its descendant folders
  • IMAP Folder Discovery Union - Folder discovery now merges a recursive LIST, a per-level traversal and an LSUB query into a union instead of trusting a single recursive LIST, recovering folders from silently truncated responses. Non-selectable (\Noselect) container folders are traversed instead of stopping the walk
  • Clickable Archive Email Rows - The entire email row in the Archive view now opens the details view, matching the Dashboard behaviour. Clicks on the selection checkbox/buttons are ignored so batch selection keeps working
  • Offload Memory Usage - Offload batches are loaded with AsNoTracking, so the change tracker no longer holds the whole job including attachment blobs in memory
  • Job Cancel Ownership - Background jobs can only be cancelled by their owner or an admin; cancel buttons are hidden from other users and the endpoints reject foreign job IDs
  • Stats API Scope - Non-admin API keys no longer receive the instance-wide PostgreSQL database size; the attachment-size fallback is scoped to the accessible accounts

πŸ› Bug Fixes

  • Offload Duplicate Index Uses Union Folder Discovery - The offload duplicate-check index now uses the same robust folder discovery as the sync, so folders hidden by a plain recursive LIST (e.g. on Outlook.com) can no longer be missed and re-appended
  • INTERNALDATE Fallback for Missing Date Headers - Messages whose envelope carries no Date header are now fingerprinted with INTERNALDATE instead of collapsing to DateTime.MinValue, so they are recognized as duplicates
  • Offload Cutoff Windows in Display Timezone - Relative cutoff windows are resolved in the configured display timezone instead of UTC, matching the documented OffloadCutoff semantics
  • Export Crash on Empty Message-IDs - EML exports no longer throw when a stored Message-ID normalizes to an empty value
  • Cancel/Dispose Race in Batch Restore - Cancelling a job whose cancellation source was already disposed no longer throws ObjectDisposedException
  • Self-Managers Restricted to Assigned Accounts - Self-managers no longer get blanket access to every account, closing a gap that let them open foreign mailboxes' emails by direct ID
  • Duplicate Detection Compares Stored Format - Restore/append duplicate checks now compare Message-ID and fingerprint in the exact form stored at import time, fixing false negatives with non-UTC display timezones or multiple recipients
  • MBox CLI Import Exit Code - Re-importing an already archived mbox no longer exits non-zero when only duplicates were skipped
  • Import Failed with "Failed to parse message headers" - Messages whose first line is a leftover mbox From -marker (e.g. from Thunderbird or Eudora) are now recovered via mbox-aware parsing instead of being skipped (GitHub issue #518)
  • Offload Ran Two Database Round-Trips per Email - Offload entities are now batch-loaded once per chunk and shared between duplicate check and append, cutting per-email queries to one per batch
  • Restored Date: Header Rendered with UTC Offset - Restored messages now write the Date: header with the display timezone's offset instead of +00:00 (same instant, cosmetic only)
  • Offload Report Truncated "fingerprint" Label - The offload summary printed of those by finger.: instead of of those by fingerprint:
  • German Password Hint Typo - Fixed "akltuelle" β†’ "aktuelle" in the LeaveBlankToKeepPassword German localization
  • OIDC Auto-Provisioning Failed for Long Entra ID Usernames - Generated usernames exceeded the varchar(50) column, aborting auto-creation. The column is now varchar(320), new usernames use the email local-part with a uniqueness suffix; existing accounts keep their old username
  • IMAP Sync Failure on Broken ESEARCH Servers - After a malformed ESEARCH response the session desynchronized and the fallback SEARCH queries ran on a disconnected client, failing the entire folder sync. The connection is now re-gated before every fallback query, so a single parser error no longer aborts the folder
  • Silent Skip of Emails Without Message-ID Header - Emails without Message-ID/Subject could be silently never archived when their weak synthetic dedupe key collided. They now receive a deterministic SHA-256 fallback ID consistent across the IMAP, import and M365 pipelines; legacy keys are still recognized and healed automatically
  • Cascading Reconnect/Auth Failure for MSA Accounts - A single malformed FETCH response triggered a reconnect that failed due to Microsoft's rapid-succession-login throttling, cascading one bad message into 141 failed emails. Fixed with a backoff before MSA re-auth, skipping messages on ImapProtocolException without reconnect, and a consecutive-failure circuit breaker that pauses the folder sync gracefully
  • Folders Not Synced After Special-Character Folder Name - On Outlook.com, the recursive LIST breaks or truncates on folder names with special characters, silently losing all following folders. Discovery now always runs a per-level traversal plus LIST and LSUB as a union. Known server-side limitation: folders created via EWS with a non-IPF.Note container class are invisible to all IMAP clients β€” rename them once in the Outlook.com web UI and run a full Resync (documented in the MSA troubleshooting guide)
  • M365/Graph Retention Skipped Archived Emails - Graph stored the Message-ID with angle brackets while retention compared a normalized value, so archived M365 emails were never deleted by server retention. Both forms are now matched, so existing archives are recognized without migration
  • M365/Graph Restored/Exported Emails Carried Malformed Message-ID - Bracketed Message-IDs were re-emitted verbatim into restored/exported MIME, failing IMAP restore and EML export. All paths now normalize to the bare token
  • Folder Tree Expand/Collapse Did Not Work - The chevron toggle looked up the child container in the wrong place (it is a sibling, not a descendant), so clicking did nothing. Fixed via nextElementSibling; the tree is also rendered fully expanded by default for now
  • Retention Deletion and Headerless Emails - The retention-deletion path used fallback keys that never matched how headerless emails were stored: mails without a Message-ID, mails without a Date header (Received-chain vs. INTERNALDATE) and legacy key formats from EML/MBOX imports or older versions were all logged as "not archived" and never deleted. Retention deletion now computes every fallback key format ever written, and the IMAP path also recognizes and heals import-format keys to prevent duplicates (GitHub discussion #302)

Don't miss a new mail-archiver release

NewReleases is sending notifications on new releases.