From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: "Kernel.org Tools" <tools@kernel.org>
Subject: Re: [PATCH kgl] Preserve original dates when importing messages over IMAP
Date: Mon, 16 Nov 2026 10:06:11 -0500 [thread overview]
Message-ID: <20261116-authentic-attentive-cricket-b046cf@toolbx> (raw)
In-Reply-To: <CADvTj4oqJCvC1CoX4Dw=nXtCR4GYS5JiTNL5--iRKjCqG2FWzw@mail.gmail.com>
On Thu, Nov 12, 2026 at 04:07:04PM -0700, James Hilliard wrote:
> On Thu, Nov 12, 2026 at 12:46 PM Konstantin Ryabitsev
> <konstantin@linuxfoundation.org> wrote:
> >
> > > IMAP APPEND currently omits its optional timestamp, so the server assigns
> > > the import time even when the message has a valid Date header. Archived
> > > messages consequently appear as newly received in clients that sort by
> > > INTERNALDATE, including the Gmail web interface.
> >
> > In general, I would consider this a feature, even if this was not really
> > intended. I would specifically lean on this in a scenario where we
> > perform a "yank" command -- someone would routinely be yanking an old
> > thread and they wouldn't really want to go hunting for it in the middle
> > of last month's mail.
>
> I checked the other targets, and there isn't currently a consistent
> date policy across them:
>
> - Gmail API imports already use a valid Date: header. The target omits
> internalDateSource, whose API default is dateHeader [0].
> - JMAP imports omit receivedAt, which defaults to the most recent
> Received: timestamp, or import time if none exists [1].
> - IMAP without an APPEND timestamp uses import time.
> - Maildir preserves Date: but creates the file with an import-time mtime.
>
> Consequently, importing the same archived message through Gmail's API
> or through IMAP can give it different dates in the same Gmail mailbox.
> Preserving Date: for IMAP would align the normal case with what the
> Gmail target already does.
Okay, after more thought, I think your reasoning is good. I didn't take your
patch series directly, because there is already code in liblore that handles
date header parsing and I wanted to use that instead of reimplementing it.
The latest master should have the functionality you were looking for and I
credited your submission with a Link: and Co-Developed-By.
Thanks!
-K
next prev parent reply other threads:[~2026-11-16 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 18:42 [PATCH kgl] Preserve original dates when importing messages over IMAP James Hilliard
2026-11-12 19:46 ` Konstantin Ryabitsev
2026-11-12 23:07 ` James Hilliard
2026-11-16 15:06 ` Konstantin Ryabitsev [this message]
2026-11-17 2:52 ` James Hilliard
2026-11-17 14:58 ` Konstantin Ryabitsev
2026-11-17 16:53 ` James Hilliard
2026-11-26 17:48 ` Konstantin Ryabitsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116-authentic-attentive-cricket-b046cf@toolbx \
--to=konstantin@linuxfoundation.org \
--cc=james.hilliard1@gmail.com \
--cc=tools@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.