[Dovecot] changing INTERNALDATE or similar

richs at whidbey.net richs at whidbey.net
Thu Jul 17 23:04:04 EEST 2008


I believe it's still true that any mail files that are IMAP STORE'd 
(uploaded) to Dovecot by a client will have a current mtime, rather than 
the "Date" in the message.  That means might need to compare mtime's to 
"Date" headers for new files that appear too.

Here we just patched Dovecot to treat "INTERNALDATE" the same as the 
"Date" header. Constantly verifying mtime's became too much of a chore 
for those clients that rely on it (although this technically is against 
the RFC).

Rich

Rudnick, Karl wrote:
 > Terrific - I'll just write a script to:
 >
 > 1. cd to all Maildir folders
 > 2. remove dovecot.index* in each folder
 > 3. For each mail file in each Mailder folder:
 >    a. grep/ask "Date:"
 >    b. pipe the output of a into "touch --date" for that file
 >
 > On my windows side, all the imap info is save in one pst file in
 > "C:\Documents and Settings\<user>\Local Settings\Application
 > Data\Microsoft\Outlook\Outlook*imap*.pst" and if I blow it away it gets
 > correctly rebuilt - I just tested it and the blown away index files get
 > rebuilt so that Outlook then has the correct Received date displayed.
 > Pretty easy to do, but surprised a script wasn't openly available - or
 > at least my googling skills weren't good enough. Since I have ~35,000
 > emails in about 450 folders, this needs to be scripted. I'll make it
 > available when I get it smoothed out.
 >
 > Thanks again for the clarification.
 > - Karl
 >
 > -----Original Message-----
 > From: Timo Sirainen [mailto:tss at iki.fi]
 > Sent: Thursday, July 17, 2008 4:58 AM
 > To: Rudnick, Karl; Dovecot Mailing List
 > Subject: Re: [Dovecot] changing INTERNALDATE or similar
 >
 > On Wed, 2008-07-16 at 16:56 -0700, Karl Rudnick wrote:
 >> I have a question which others must have encountered. I switched from
 >> uw-imap to dovecot-imap a few months ago and moved my fairly large
 > mail
 >> archive (~15 yrs) by simply mounting both accounts in a mail app and
 >> simply copying my folders over. This worked well, and all my mail is
 > in
 >> order when I view it in evolution or thunderbird on any number of
 >> machines. However, since our company uses MS Exchange Server, when I
 > add
 >> my dovecot imap account to outlook, everything is great except the
 >> received dates - it looks like the date I made the transition, but in
 >> all instances it's not simply the time stamp in the Maildir folder. I
 >> googled around on this and have gathered that this date is coming
 >> somewhere from within the dovecot index file.
 >
 > INTERNALDATE comes from the maildir files' mtimes. So you can use
 > whatever utility/script you want to modify the mtime (I don't have any
 > suggestions). Then delete dovecot.index.cache file to make sure the old
 > value wasn't cached. You might also have to recreate the account in your
 > clients to make sure they haven't cached the old values.
 >


More information about the dovecot mailing list