[Dovecot] changing INTERNALDATE or similar

Timo Sirainen tss at iki.fi
Thu Jul 17 23:12:55 EEST 2008


On Thu, 2008-07-17 at 13:04 -0700, richs at whidbey.net wrote:
> I believe it's still true that any mail files that are IMAP STORE'd 
> (uploaded) 

You mean IMAP APPENDed.

> 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.

This is only because the client doesn't specify the date to APPEND
command.

> 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).

Would probably have been better to set the default INTERNALDATE based on
the Date: header in APPEND command. Should be pretty easy to do with
Maildir I think.

static int maildir_save_finish_real(struct mail_save_context *_ctx)
..
if (ctx->received_date == (time_t)-1 && ctx->cur_dest_mail != NULL)
  mail_get_date(ctx->cur_dest_mail, &ctx->received_date);

And probably move:

	if (ctx->cur_dest_mail != NULL) {
		index_mail_cache_parse_deinit(ctx->cur_dest_mail,
					      ctx->received_date, !ctx->failed);
	}

higher up in the code so it gets executed before the mail_get_date() call.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080717/acf75493/attachment.bin 


More information about the dovecot mailing list