You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, at present this missing feature is a hard pass for implementation. I have tried retesting a few times over a few years but keep hitting this wall.
Describe the solution you'd like
Proposed behaviour
All message body fetches during sync should use BODY.PEEK[] (or the MailKit PEEK-equivalent) so that the \Seen flag on the IMAP server is never altered by the archiver
The archiver should record the \Seen flag state at the time of fetch (already read or unread) and store it in the archive metadata, so the archive accurately reflects the read status at time of archiving
The archiver should never write any flag changes back to the IMAP server under any circumstances during normal sync operation
Additional context
Describe the feature
When Mail-Archiver fetches messages from an IMAP server, it should use BODY.PEEK[] rather than BODY[] to retrieve message content. This is a standard IMAP mechanism (defined in RFC 3501) that retrieves the full message body without triggering the server to set the \Seen flag as a side effect.
Currently, fetching messages via BODY[] (or the MailKit equivalent GetMessageAsync) causes most IMAP servers to automatically mark those messages as read. This is destructive behaviour for an archiver, which should be entirely non-mutating toward the source mailbox.
Why this matters
An email archiver's role is to observe and preserve — not to alter the state of the source mailbox in any way. Users rely on the unread/read status of their emails to manage their workflow. If archiving silently marks unread emails as read on the server, this:
Causes users to miss emails they have not yet acted on
Makes the archiver unsafe to run against production mailboxes
Breaks the fundamental principle that archiving should be non-destructive
This is a well-known IMAP pitfall. The fix is: replace any BODY[] fetch calls with BODY.PEEK[], or use MailKit's GetStream/fetch API in a way that does not implicitly set \Seen.
Further Additional context
The MailKit library used by Mail-Archiver does support PEEK-style fetching. The stack trace visible in issue #236 confirms that MailKit.Net.Imap.ImapFolder.GetMessageAsync(UniqueId uid...) is the current fetch method — this method does set \Seen on most servers. The solution is to use the lower-level MailKit fetch API with BodyPartBasic and PEEK semantics instead.
This change would make Mail-Archiver suitable for users migrating from commercial archivers such as Mailstore, where non-destructive IMAP fetching is a baseline expectation.
Happy to assist with testing against a live IMAP account if that would be useful during development.
If you have got this far, thank you for taking the time to review this request.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem?
No, at present this missing feature is a hard pass for implementation. I have tried retesting a few times over a few years but keep hitting this wall.
Describe the solution you'd like
Proposed behaviour
BODY.PEEK[](or the MailKit PEEK-equivalent) so that the\Seenflag on the IMAP server is never altered by the archiver\Seenflag state at the time of fetch (already read or unread) and store it in the archive metadata, so the archive accurately reflects the read status at time of archivingAdditional context
Describe the feature
When Mail-Archiver fetches messages from an IMAP server, it should use
BODY.PEEK[]rather thanBODY[]to retrieve message content. This is a standard IMAP mechanism (defined in RFC 3501) that retrieves the full message body without triggering the server to set the\Seenflag as a side effect.Currently, fetching messages via
BODY[](or the MailKit equivalentGetMessageAsync) causes most IMAP servers to automatically mark those messages as read. This is destructive behaviour for an archiver, which should be entirely non-mutating toward the source mailbox.Why this matters
An email archiver's role is to observe and preserve — not to alter the state of the source mailbox in any way. Users rely on the unread/read status of their emails to manage their workflow. If archiving silently marks unread emails as read on the server, this:
This is a well-known IMAP pitfall. The fix is: replace any
BODY[]fetch calls withBODY.PEEK[], or use MailKit'sGetStream/fetch API in a way that does not implicitly set\Seen.Further Additional context
The MailKit library used by Mail-Archiver does support PEEK-style fetching. The stack trace visible in issue #236 confirms that
MailKit.Net.Imap.ImapFolder.GetMessageAsync(UniqueId uid...)is the current fetch method — this method does set\Seenon most servers. The solution is to use the lower-level MailKit fetch API withBodyPartBasicandPEEKsemantics instead.This change would make Mail-Archiver suitable for users migrating from commercial archivers such as Mailstore, where non-destructive IMAP fetching is a baseline expectation.
Happy to assist with testing against a live IMAP account if that would be useful during development.
If you have got this far, thank you for taking the time to review this request.
All reactions