more on maildir modification times!

Nicolas Sebrecht nicolas.s-dev at
Thu Apr 2 10:45:37 BST 2015

On Thu, Apr 02, 2015 at 09:38:08AM +0200, Nicolas Sebrecht wrote:

> I think rtime can be set by utime_from_message from 3bc66c0858ecc2e6
> that I recently changed to utime_from_header in 3bc66c0858ecc2e6.

My commit is 5a4e4fd0c2b2c369040.

> So, there is at least one use case where rtime was set and os.utime()
> does the job we expect.
> I don't care much about breaking an undocumented feature BUT I believe
> this feature will come back again if we remove it. So, I'd rather keep
> this line and not break it.
> Requesting for INTERNALDATE is the good fix.

More about this. "rtime" was introduced with:

  commit 03488ba81b0afc239ee88701384c765cd68db8db
  Author: John Goerzen <jg?@?.org>
  Date:   Tue Aug 22 02:09:36 2006 +0100

    Sync INTERNALDATE <-> mtime

    The attached patch adds syncing the INTERNALDATE of IMAP folders with
    the mtime of messages in maildir folders.
    I want this to happen, because I'm running a dovecot over the maildirs
    synced by offlineimap, and that uses the mtime as the INTERNALDATE.
    When using mutt to view messages I generally sort based on the received
    date, which for IMAP folders is the INTERNALDATE.

    Since this is the first real coding I've done in Python the patch may
    need to be cleaned up some, but it's working pretty well for me.  I've
    added new messages to each side, and the received date has been
    preserved going both ways.

I think we still want our faked INTERNALDATE logic for Maildir to match
the dates and times of the remote.

I still don't know why this 'r' prefix in "rtime" BTW. I guess it stands
for "remote".

Anyway, we have:
- "rtime": remote INTERNALDATE date and times for maildirs (might even
  be used to fix INTERNALDATE on IMAP/IMAP).
- local Maildir modification times: used for quick syncs.

I believe Cyril got it wrong in 3bc66c0858ecc2e6 to hijack the meaning
of "rtime" in the first place. He aimed to fix the local modification to
match the header date. No more.

Sadly, Cyril faked his mail address so we can't ask him.

Hence, I've changed my mind. We should either fix his code not to use
"rtime", or we revert his patch in the intend for someone using this
feature to wake up and re-insert it properly.

Any opinion?

Nicolas Sebrecht

More information about the OfflineIMAP-project mailing list